LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   module compilation (https://www.linuxquestions.org/questions/linux-general-1/module-compilation-9830/)

aliyildiz 12-08-2001 01:53 PM

module compilation
 
i am trying to compile a simple hello module but when i write

gcc -c -Wall hello.c

then i get

warning: implicit declaration of function "printk"

so where is the wrong , thanx for helps

/* hello.c */

#define MODULE
#include <linux/module.h>

int init_module(void) {printk("<1>hello\n"); return 0; }

void cleanup_module(void) {printk("<1>goodbye\n");}


All times are GMT -5. The time now is 05:56 AM.