LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

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

Rep: Reputation: 33
module won't complie


code::

#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.

len
scrp
nbits
syntex error
buf uncleared
pid-chain incompete
pid-list incomplete
entry incomplete

Any ideas?

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

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


Reply


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


All times are GMT -5. The time now is 06:11 PM.

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