LinuxQuestions.org
Review your favorite Linux distribution.
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 04-07-2007, 08:17 AM   #1
nesta
Member
 
Registered: Aug 2006
Posts: 100

Rep: Reputation: 15
how to fix this compiling error?


hi all,
i have a C header file named by linux.h which contains the following section of code:

Code:
#define USBI_BUS_PRIVATE \
	char filename[PATH_MAX + 1]; \
	struct usbi_device *dev_by_num[USB_MAX_DEVICES_PER_BUS];
and another header file named by usbi.h which includes the linux.h header file and here is a piece of code:

Code:
struct usbi_bus {
  struct list_head list;

  pthread_mutex_t lock;

  libusb_bus_id_t busid;
  unsigned int busnum;			/* Only needs to be unique */

  struct usbi_backend_ops *ops;
  int io_pattern;

  struct list_head devices;
  struct usbi_device *root;

  USBI_BUS_PRIVATE
};
watch the red line.

when i try to compile this usb package i got the following error:

expected specifier-qualifier-list before 'USBI_BUS_PRIVATE'

can anyone please how to fix this error?

thanks in advance.
 
Old 04-07-2007, 09:45 AM   #2
nesta
Member
 
Registered: Aug 2006
Posts: 100

Original Poster
Rep: Reputation: 15
i have solved the error guys,
i was not include the linux.h

thanks anyway
 
Old 04-07-2007, 09:58 AM   #3
Kristofer
LQ Newbie
 
Registered: Nov 2005
Location: Sweden
Distribution: Slackware
Posts: 20

Rep: Reputation: 0
Post the actual error lines

Could you please post the actual error messages + a couple of lines before.

My guess is that the .h file that contains the define was not found, but it's just a first guess given the above information.

/Kristofer

EDIT: You seem to have solved the problem while I posted the message

Last edited by Kristofer; 04-07-2007 at 09:59 AM.
 
  


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
How can I fix this error? Perquisitor Linux - Newbie 4 09-04-2006 10:26 AM
What does this error mean and how can I fix it? M$ISBS Linux - General 11 11-18-2005 06:50 AM
can anyone fix this error ?? vstealerv Linux - Newbie 2 04-30-2005 08:03 PM
Is there a fix for this error slackrush Slackware 2 07-10-2004 08:53 AM
how do i fix this error AMArt79196 Red Hat 1 07-05-2004 03:44 PM

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

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