LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 09-13-2011, 11:38 AM   #1
szutshi
LQ Newbie
 
Registered: Sep 2011
Posts: 2

Rep: Reputation: Disabled
Linux header files missing and v4l files unable to compile


Hello here is some background info:
Ubuntu 11.04?
Cameras:
Logitech HD PRO WEBCAM C910
Logitech Webcam C905

I am working on trying to implement webcam control using the v4l library and c. I download the example file capture.c, the most luck ive had is the light comes on and all i get is a 100 '.' s in the terminal. Ive seen many threads on this website regarding this but most of the examples dont help me. SDL cam package gave me the error i see all the time similar to this:

vivi.c:15:26: fatal error: linux/module.h: No such file or directory
compilation terminated.

or others like SDL/SDL.h, or linux/videodev.h. its always something or the other, the headers just dont seem to work with the directory structure, they are all in linux-headers-2.x.x... or w/e

All i want to do is use c code to display my webcam. OpenCV apparently isnt compatible with both my camera's but i didnt want a middle system between my camera and its instructions anyways. Some help on how to take the frames in the buffer and take them and display them would be great. Even if i can just get them as ppms. Every different example i find always has some compilation error due to the directory structure and the header files not existing in their specified file paths.

Please help!
 
Old 09-13-2011, 11:52 AM   #2
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,035

Rep: Reputation: Disabled
Hi and Welcome to LQ!
I'm not quite sure what your problem is. Have you already downloaded your kernel header files? If not you can download the header files for your kernel exactly the same way you download any other package.
ciao,
jdk
 
Old 09-13-2011, 12:12 PM   #3
szutshi
LQ Newbie
 
Registered: Sep 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Yes i have downloaded everything possible i believe.

If there is a command i can try to cross check or try and download again that would be great.

i am very very new to linux and have been thrown into a project so cross checking isn't easy :-(
 
Old 09-13-2011, 01:08 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,196

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Terminal :

sudo apt-get install linux-headers libsdl1.2-dev

The on-line search
http://packages.ubuntu.com/search?su...headers-2.6.38
http://packages.ubuntu.com/search?su...s=linux-source
http://packages.ubuntu.com/search?su...=libsdl1.2-dev
http://packages.ubuntu.com/search?su...nux%2Fmodule.h

Please also use the "Search" in Synaptic.

About linux/module.h : You will have to point to e.g.
/usr/src/linux-headers-2.6.38-8-generic/include/

.
 
Old 09-13-2011, 01:09 PM   #5
lystor
Member
 
Registered: May 2010
Location: Ukraine, Donetsk
Posts: 43

Rep: Reputation: 3
Quote:
Originally Posted by szutshi View Post
vivi.c:15:26: fatal error: linux/module.h: No such file or directory
compilation terminated.
Hi
Try to install linux-headers deb:
Code:
# sudo apt-get install linux-headers-$(uname -r)
 
Old 09-13-2011, 02:00 PM   #6
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,035

Rep: Reputation: Disabled
Quote:
Originally Posted by szutshi View Post
Yes i have downloaded everything possible i believe.
No human has ever done that before.

Quote:
If there is a command i can try to cross check or try and download again that would be great.

i am very very new to linux and have been thrown into a project so cross checking isn't easy :-(
Knudfl and lystor have given you commands for downloading the headers. If you want to check (I don't know what cross checking means) if you have already downloaded the headers try this command:
Code:
 aptitude search linux-headers
If you find the package with your kernel on it with an "i" at the beginning of the line this means that you have installed the headers. Here's an example taken from my system:
Code:
p   linux-headers-3.0.0-1-amd64                - Header files for Linux 3.0.0-1-amd64                 
p   linux-headers-3.0.0-1-common               - Common header files for Linux 3.0.0-1                
p   linux-headers-3.0.0-1-common-rt            - Common header files for Linux 3.0.0-1-rt             
p   linux-headers-3.0.0-1-rt-amd64             - Header files for Linux 3.0.0-1-rt-amd64              
i A linux-headers-3.0.0-4.dmz.2-liquorix-amd64 - Header files for Linux 3.0.0-4.dmz.2-liquorix-amd64  
p   linux-headers-amd64                        - Header files for Linux amd64 configuration (meta-pack
i A linux-headers-liquorix-amd64               - Linux image for liquorix on 64-bit PCs
My current kernel is 3.0.0-4.dmz.2-liquorix-amd64 so you can see that I have installed the headers for my kernel. The "p" means the package is not installed.
ciao,
jdk
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check missing header files included from another header file adisan82 Linux - Software 1 01-28-2011 03:57 AM
C++ Header files missing virtualsaum Linux - Newbie 3 08-15-2009 01:40 PM
Possibly missing /usr/include/linux header files.. how to fix? brfindla Debian 2 08-10-2009 11:21 AM
Missing C header files? kushalkoolwal Programming 3 11-07-2005 04:52 AM
c header files in linux in place of header files in windows? harun_acs Programming 1 03-17-2004 02:24 AM


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