LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 05-18-2013, 08:32 PM   #1
alpo85
Member
 
Registered: Nov 2012
Posts: 30

Rep: Reputation: Disabled
GCC header/include path configuration question...


I'm showing files installed from two versions of libstdc++, those versions being 4.4.4 and 4.4.7. (installed using yum/RHN):

Code:
[user@user ~]$ ls /usr/include/c++
4.4.4  4.4.7
And, their contents:

Code:
[user@user ~]$ ls /usr/include/c++/4.4.7
algorithm        complex             cxxabi.h             limits       stdexcept
array            complex.h           debug                list         streambuf
backward         condition_variable  deque                locale       string
bits             csetjmp             exception            map          system_error
bitset           csignal             exception_defines.h  memory       tgmath.h
c++0x_warning.h  cstdarg             exception_ptr.h      mutex        thread
cassert          cstdatomic          ext                  new          tr1
ccomplex         cstdbool            fenv.h               numeric      tr1_impl
cctype           cstddef             forward_list         ostream      tuple
cerrno           cstdint             fstream              parallel     typeinfo
cfenv            cstdio              functional           queue        type_traits
cfloat           cstdlib             initializer_list     random       unordered_map
chrono           cstring             iomanip              ratio        unordered_set
cinttypes        ctgmath             ios                  regex        utility
ciso646          ctime               iosfwd               set          valarray
climits          cwchar              iostream             sstream      vector
clocale          cwctype             istream              stack        x86_64-redhat-linux
cmath            cxxabi-forced.h     iterator             stdatomic.h
[user@user ~]$ ls /usr/include/c++/4.4.4
algorithm        complex             cxxabi.h             limits       stdexcept
array            complex.h           debug                list         streambuf
backward         condition_variable  deque                locale       string
bits             csetjmp             exception            map          system_error
bitset           csignal             exception_defines.h  memory       tgmath.h
c++0x_warning.h  cstdarg             exception_ptr.h      mutex        thread
cassert          cstdatomic          ext                  new          tr1
ccomplex         cstdbool            fenv.h               numeric      tr1_impl
cctype           cstddef             forward_list         ostream      tuple
cerrno           cstdint             fstream              parallel     typeinfo
cfenv            cstdio              functional           queue        type_traits
cfloat           cstdlib             initializer_list     random       unordered_map
chrono           cstring             iomanip              ratio        unordered_set
cinttypes        ctgmath             ios                  regex        utility
ciso646          ctime               iosfwd               set          valarray
climits          cwchar              iostream             sstream      vector
clocale          cwctype             istream              stack        x86_64-redhat-linux
cmath            cxxabi-forced.h     iterator             stdatomic.h
gcc --version: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

Problem is, when compiling a program in Eclipse, Eclipse shows that gcc searches the 4.4.4 folder (rather than 4.4.7) for headers and includes.

How can I verify gcc is actually using the 4.4.7 folder rather than the 4.4.4 folder? And, how can I remove the 4.4.4. from gcc's search path?
 
Old 05-19-2013, 03:08 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
[user@user ~]$ ls /usr/include/c++
4.4.4 4.4.7
Better use :
Code:
ls -l /usr/include/c++
... to know that '4.4.7' is just a symlink to '4.4.4'.

I.e. the RHEL6.0 gcc-c++ / libstdc++ started out originally as version 4.4.4 .
Later on version 4.4.6 installed a link '4.4.6'.
And with the current version you now have a link "4.4.7".
ftp://ftp.redhat.com/redhat/linux/en...r/en/os/SRPMS/
→ → There was a '4.4.5' for a short time too !

-

Last edited by knudfl; 05-19-2013 at 03:18 PM.
 
Old 05-19-2013, 09:18 PM   #3
alpo85
Member
 
Registered: Nov 2012
Posts: 30

Original Poster
Rep: Reputation: Disabled
Welp, that solves that. Thanks.
 
  


Reply

Tags
c++, compile, gcc, headers, include



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 to use header file #include<conio.h> in fedora 17 using gcc kiki2009 Linux - Newbie 3 10-01-2012 02:33 PM
Does gcc with different version include some different default header files? cplus Programming 5 07-10-2011 05:09 AM
[SOLVED] what is gcc include path/ linux include path ghantauke Linux - Newbie 1 03-08-2011 08:34 PM
header include path KDE4me Linux - Newbie 6 01-06-2005 06:17 AM
GCC include path. jwilson Linux - General 1 04-02-2001 03:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 02:04 PM.

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