LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
 
Search this Thread
Old 06-03-2012, 12:41 PM   #1
tornado90
LQ Newbie
 
Registered: Dec 2011
Posts: 8

Rep: Reputation: Disabled
Compiler can't include header files


Hi all,
I am working with openSuse using C++ (I am a bit new to it)
I have a limited access on this computer, which means I can't be a super user, so in order to add my header files, I put them in a folder, and used this command in the bash shell
export PATH=$PATH:/mypath

and when I tested using
$ echo $PATH

I found that my path is included, but whenever I run the file, it says that it can't find the files.

Can anyone help me ASAP ?
Thanks a lot
 
Old 06-03-2012, 12:51 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,745
Blog Entries: 1

Rep: Reputation: 224Reputation: 224Reputation: 224
Adding the directory containing the headers to PATH isn't going to work. You need to add the path to the directory to your CXXFLAGS variable. Something along these lines
Code:
export CXXFLAGS="-I/mypath"
However, if the headers you need are in a standard location such as /usr/include, you should be able to use them even without root access. They will be readable to all and that is all that need be done.
 
Old 06-03-2012, 12:56 PM   #3
tornado90
LQ Newbie
 
Registered: Dec 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks a lot for your reply

I tried your line in the terminal, but still I have the same error

unfortunately the headers aren't in the root file, and I don't have the right to copy them to this place

So do you have any idea, what might be my problem ?
 
Old 06-03-2012, 01:02 PM   #4
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,745
Blog Entries: 1

Rep: Reputation: 224Reputation: 224Reputation: 224
Maybe telling us exactly what you're trying to build, the steps you're using to do it, and exactly what error(s) you're receiving.
 
Old 06-03-2012, 01:09 PM   #5
tornado90
LQ Newbie
 
Registered: Dec 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
I have a file that is already written, and I am supposed to understand and debug it
the file is 100% working, it depends on boost library, and the boost library is correctly installed.

when I run the .cpp file, I get this error
error: Boolean/my.hpp: No such file or directory

and a lot of lines like this one, just stating the it can't find my header files
 
Old 06-03-2012, 02:48 PM   #6
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,745
Blog Entries: 1

Rep: Reputation: 224Reputation: 224Reputation: 224
Right. And if you provided the details as requested, it would be easier to help. I really don't have time to play 20 questions.
 
1 members found this post helpful.
Old 06-04-2012, 02:28 PM   #7
tornado90
LQ Newbie
 
Registered: Dec 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
there is no need for such an attitude, if you don't have time to help me,
nobody forced you to reply on my thread.
Anyway thnx for the help, I solved the problem
 
  


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
Does gcc with different version include some different default header files? cplus Programming 5 07-10-2011 05:09 AM
C Header files missing in /usr/include zorro_kwh Ubuntu 3 04-12-2008 06:57 PM
Include kernel header files fallen3019 Programming 10 05-12-2007 08:35 PM
Kernel header (include) files - where do i find these walkerx Mandriva 2 04-17-2005 08:19 AM
Problem with C++ include/header files! Pisces107 Programming 12 12-23-2003 11:06 PM


All times are GMT -5. The time now is 02:16 AM.

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