LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 05-03-2005, 08:30 PM   #1
okeyla
Member
 
Registered: Nov 2004
Posts: 47

Rep: Reputation: 15
Cannot compile LDD example codes...


I just wanna compile Orailly's Linux Device Driver example code,
but neither version 2 nor 3 success... >_<

The Linux Device Driver 2nd version (for 2.4.X ) example compile error:
(RedHat9 2.4.20-8)

for n in misc-progs misc-modules skull scull scullc scullp scullv sbull spull snull short shortprint pci simple usb allocator; do make -C $n || exit 1; done
make[1]: Entering directory `/usr/src/linux-2.4.20-8/drivers/ldd2-samples-1.0.1/misc-progs'
cc -O2 -fomit-frame-pointer -Wall -I/usr/include setlevel.c -o setlevel
/tmp/cc2L3MPN.o(.text+0x1c): In function `syslog':
: undefined reference to `errno'
/tmp/cc2L3MPN.o(.text+0x89): In function `main':
: undefined reference to `errno'
collect2: ld returned 1 exit status
make[1]: *** [setlevel] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.20-8/drivers/ldd2-samples-1.0.1/misc-progs'
make: *** [subdirs] Error 1


The Linux Device Driver 3rd version (for 2.6.X ) example compile error:
(Fedora Core2 2.6.5-1)

[root@localhost examples]# make
for n in misc-progs misc-modules skull scull scullc sculld scullp scullv sbull snull short shortprint pci simple usb tty lddbus; do make -C $n || exit 1; done
make[1]: Entering directory `/root/TEST/examples/misc-progs'
cc -O2 -fomit-frame-pointer -Wall -I/lib/modules/2.6.5-1.358/build/include inp.c -o inp
In file included from /lib/modules/2.6.5-1.358/build/include/asm/io.h:4,
from inp.c:33:
/lib/modules/2.6.5-1.358/build/include/linux/config.h:6:2: #error including kernel header in userspace; use the glibc headers instead!
make[1]: *** [inp] Error 1
make[1]: Leaving directory `/root/TEST/examples/misc-progs'
make: *** [subdirs] Error 1

Please give me a hand~
 
  


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
Are the hex codes for colors in a jpg the same codes as used in html? abefroman Linux - Security 3 07-31-2005 03:21 PM
How to compile and run C codes in Fedora Core? hoper Programming 1 11-03-2004 01:53 PM
trying to compile untared codes josejose Linux - Newbie 5 10-07-2004 09:09 PM
about ldd -d jingle_mj Programming 4 09-10-2004 06:25 AM
about ldd -d jingle_mj Linux - General 2 08-25-2004 06:30 AM


All times are GMT -5. The time now is 08:23 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