вот экзампл из Orelly http://www.xml.com/ldd/chapter/book/pdf/ch02.pdf #define MODULE #include <linux/module.h> int init_module(void) {printk("<1>Hello, world\n";); return 0;} void cleanup_module(void) {printk("<1>Goodbue cruel world\n";);} и на команду gcc -c aa.cpp оно мне пишет: [root@mobile100 robots]# gcc -c ee.cpp ee.cpp: In function `int init_module()': ee.cpp:4: `printk' undeclared (first use this function) ee.cpp:4: (Each undeclared identifier is reported only once for each function it appears in.) ee.cpp:5:64: warning: no newline at end of file [root@mobile100 robots]# и как?? пробовал printf вместо printk [root@mobile100 robots]# gcc -c ee.cpp ee.cpp: In function `int init_module()': ee.cpp:4: `printf' undeclared (first use this function) ee.cpp:4: (Each undeclared identifier is reported only once for each function it appears in.) ee.cpp:5:64: warning: no newline at end of file [root@mobile100 robots]# gcc -v Reading specs from /usr/lib/gcc-lib/i386-asplinux-linux/3.2.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-asplinux-linux Thread model: posix gcc version 3.2.2 20030222 (ASPLinux 3.2.2-5asp) [root@mobile100 robots]#
![](/photos/5912:-1089048451.jpg)
![](/img/p.gif)
![](/img/p.gif)
![](/photos/5912:-1089048451.jpg)
![](/photos/5912:-1089048451.jpg)
![](/photos/5912:-1089048451.jpg)
![](/img/p.gif)
![](/img/p.gif)
![](/photos/5912:-1089048451.jpg)
![](/photos/5912:-1089048451.jpg)
![](/img/p.gif)
![](/photos/5912:-1089048451.jpg)
![](/img/p.gif)
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Похожие темы
- Форум Хочу заюзать функцию cpufreq_get но компилятор ругаеться - какой ключ мне указать ? (2005)
- Форум тип bool в C (2003)
- Форум не получается разбить программу (2011)
- Форум linux-2.6.22.1 - ошибка при сборке (2007)
- Форум _GNU_SOURCE по-умолчанию отключен? (2008)
- Форум не компилируется oxine (2005)
- Форум [нубас] gcc и тестовый пример (2010)
- Форум Кто поставил d4x 5.0_rc4? (2004)
- Форум как собрать? (2005)
- Форум CenterICQ не компилится! :( (2004)