LinuxQuestions.org
Register a domain and help support LQ
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 09-10-2004, 11:01 AM   #1
Zotty
LQ Newbie
 
Registered: Sep 2004
Location: Netherlands
Distribution: Debian testing
Posts: 25

Rep: Reputation: 15
No such file or directory errors


I'm having a problem where specific headerfiles cannot be found during the compiling fase (filename.h: No such file or directory). The files are present on my system, they're just located in a different subdirectory.

Example:
One of the things I'm trying to build is a plugin for XMMS for which I've installed (among others) the xmms-dev and libgtk1.2-dev packages. The xmms-dev package installed it's files in /usr/include/xmms/ and libgtk1.2-dev put them in /usr/include/glib-1.2/
Now the problem is that XMMS's 'plugin.h' which is found in /usr/include/xmms/ includes the headerfile 'glib.h' using '#include <glib.h>'. But as this headerfile is not located in the same directory (it is located in /usr/include/glib1.2/), GCC will spit out the no such file error.

Please note that the above example is not the only case. It happens with all headerfiles located in /usr/include/ subdirectories...

I'm using Debian with a 2.6.7 kernel and GCC 3.3.4 for compiling. Packages mentioned are installed with apt-get.

How can this be solved? Any tip in the right direction is welcome.
 
Old 09-10-2004, 11:05 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Could you post the relevant lines in your code that you used to include the files ?
 
Old 09-10-2004, 01:10 PM   #3
Zotty
LQ Newbie
 
Registered: Sep 2004
Location: Netherlands
Distribution: Debian testing
Posts: 25

Original Poster
Rep: Reputation: 15
In the c++ file I'm trying to compile:

Code:
#include <xmms/plugin.h>
And in in /usr/include/xmms/plugin.h
Code:
#include <glib.h>
Note that the xmms header files are not supposed to be edited. That's also why I'm looking for a solution instead of just editing or copying the files.

To compile I simply use:
g++ -c filename.cpp
 
Old 09-10-2004, 04:02 PM   #4
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
try that to see :
g++ -I/usr/include/glib1.2 -c filename.cpp

There is not documentation how to compile module with your xmms devel package, in particular which options to give to g++ ?

Last edited by Cedrik; 09-10-2004 at 04:03 PM.
 
Old 09-11-2004, 09:27 AM   #5
Zotty
LQ Newbie
 
Registered: Sep 2004
Location: Netherlands
Distribution: Debian testing
Posts: 25

Original Poster
Rep: Reputation: 15
Thank you, it compiles now!

-I/usr/include/glib1.2/ (note the extra /)

xmms documentation is not the best out there. Basicly they just tell you to look at the source of plugins other people made...
 
  


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
error: stat of /var/log/ppp/connect-errors failed: No such file or directory Niceman2005 Linux - Newbie 0 01-20-2005 12:29 AM
/usr/bin/find :No such file or Directory errors while trying to compile kernel. Zero-0-Effect Linux From Scratch 2 05-29-2004 03:46 PM
.xession-errors file in my home directory drxsmurf Linux - Software 3 05-06-2004 09:01 PM
compiling errors- cc1plus: No such file or directory marxy Programming 2 04-13-2004 06:09 PM
compiling errors- cc1plus: No such file or directory marxy Linux - Newbie 0 04-13-2004 12:40 PM


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