Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-21-2006, 12:22 PM   #1
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
module won't complie


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

int init_module (void) /* Loads a module in the kernel */
printk("Hello kernel n");
return 0;

void cleanup_module(void) /* Removes module from kernel */
printk("GoodBye Kerneln");
when I compile it

# gcc -c hello.c

I get about 30 error messages.

syntex error
buf uncleared
pid-chain incompete
pid-list incomplete
entry incomplete

Any ideas?

Thank you.
Old 04-21-2006, 08:05 PM   #2
Senior Member
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Try this.
gcc -c -Wall -nostdinc -I /usr/src/linux/include hello.c


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian Unstable ALSA module complie issue NukedAthlonMan Linux - Laptop and Netbook 1 05-18-2005 10:39 AM
Complie module or built-in support musicman_ace Linux - Software 4 12-19-2004 04:59 AM
Complie module or built-in support musicman_ace Linux - Software 2 12-19-2004 02:21 AM
QT3,use from CD or complie myself? ngan_yine Mandriva 0 01-14-2004 08:13 AM
complie under qt macro-linux Programming 10 11-06-2003 05:18 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration