LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 08-11-2006, 08:20 AM   #1
GSMD
Member
 
Registered: Dec 2005
Distribution: Gentoo
Posts: 87

Rep: Reputation: 16
Problems while compilation of a custom program under Ubuntu 6.06


Hello.
I'm pretty new to Linux and compiling for it. The problems that I faced during compilation of a program in KDevelop are:
Code:
In file included from /home/uranus/C_project/hid/src/hid.cpp:28:
/usr/include/linux/config.h:1:2: error: #error "Compilation aborted. Please read the FAQ for linux-libc-headers package."
/usr/include/linux/config.h:2:2: error: #error "(can be found at http://ep09.pld-linux.org/~mmazur/linux-libc-headers/doc/)"
In file included from /usr/include/linux/sched.h:16,
from /usr/include/linux/module.h:9,
from /home/uranus/C_project/hid/src/hid.cpp:31:
/usr/include/linux/signal.h:2:2: warning: #warning "You should include <signal.h>. This time I will do it for you."
/usr/include/linux/rbtree.h:128: error: expected ‘,’ or ‘...’ before ‘new’
/usr/include/linux/time.h:9: error: redefinition of ‘struct timespec’
/usr/include/time.h:119: error: previous definition of ‘struct timespec’
/usr/include/linux/time.h:15: error: redefinition of ‘struct timeval’
/usr/include/bits/time.h:70: error: previous definition of ‘struct timeval’
/usr/include/linux/time.h:20: error: redefinition of ‘struct timezone’
/usr/include/sys/time.h:57: error: previous definition of ‘struct timezone’
/usr/include/linux/time.h:47: error: redefinition of ‘struct itimerval’
/usr/include/sys/time.h:108: error: previous definition of ‘struct itimerval’
/usr/include/linux/module.h:41: error: field ‘attr’ has incomplete type
/usr/include/linux/module.h:49: error: field ‘kobj’ has incomplete type
/usr/include/stdlib.h:536: error: declaration does not declare anything
/usr/include/usb.h:66: error: redefinition of ‘struct usb_descriptor_header’
/usr/include/linux/usb_ch9.h:147: error: previous definition of ‘struct usb_descriptor_header’
/usr/include/usb.h:72: error: redefinition of ‘struct usb_string_descriptor’
/usr/include/linux/usb_ch9.h:230: error: previous definition of ‘struct usb_string_descriptor’
/usr/include/usb.h:92: error: redefinition of ‘struct usb_endpoint_descriptor’
/usr/include/linux/usb_ch9.h:262: error: previous definition of ‘struct usb_endpoint_descriptor’
/usr/include/usb.h:117: error: redefinition of ‘struct usb_interface_descriptor’
/usr/include/linux/usb_ch9.h:244: error: previous definition of ‘struct usb_interface_descriptor’
/usr/include/usb.h:143: error: redefinition of ‘struct usb_config_descriptor’
/usr/include/linux/usb_ch9.h:208: error: previous definition of ‘struct usb_config_descriptor’
/usr/include/usb.h:160: error: redefinition of ‘struct usb_device_descriptor’
/usr/include/linux/usb_ch9.h:156: error: previous definition of ‘struct usb_device_descriptor’
/usr/include/hid.h:57: error: typedef ‘_Bool’ is initialized (use __typeof__ instead)
/usr/include/hid.h:57: error: ‘matcher_fn_t’ was not declared in this scope
/usr/include/hid.h:57: error: expected ‘,’ or ‘;’ before ‘(’ token
/usr/include/hid.h:62: error: ‘matcher_fn_t’ does not name a type
/home/uranus/C_project/hid/src/hid.cpp:54: error: ‘wait_queue_head_t’ does not name a type
Is there something I've missed? Any hints & ideas?

Thank you.
 
Old 08-11-2006, 09:12 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
I would never claim to be a programmer, but the output you posted tells you what the errors are. You need to look at the line in your source code where the error occurs and figure out what is wrong.
Code:
/home/uranus/C_project/hid/src/hid.cpp:54: error: ‘wait_queue_head_t’ does not name a type
Tells you that line 54 in hid.cpp is where the error occurs and what the error is. In KDevelop, if you click on the error message, you will be taken to the appropriate line.

I suspect someone would need to see the source before they could tell you what you're doing wrong.
 
Old 08-14-2006, 05:32 AM   #3
GSMD
Member
 
Registered: Dec 2005
Distribution: Gentoo
Posts: 87

Original Poster
Rep: Reputation: 16
Thanks for you reply.
Actually I can't figure out what the mistakes are. Here is the beginning of hid.cpp where these errors occur:
Code:
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <linux/input.h>
#include <linux/usb.h>
#include "hid.h"
#include <linux/hiddev.h>
#include <linux/devfs_fs_kernel.h>
void main (){
}
 
  


Reply



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
Ubuntu 6.06 custom partitioning General Ubuntu 7 06-07-2006 04:02 PM
Key bindings program (custom pasting, program execution, etc.) jrdioko Linux - Software 2 02-05-2005 09:09 PM
c program compilation harun_acs Programming 3 03-18-2004 10:29 AM
Custom Kernel Compilation Errors? d4harvey Red Hat 1 03-16-2004 12:00 PM
Compilation of Program? drdroid Programming 5 12-09-2003 05:41 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:57 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration