Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > g++ search path

Reply
Thread Tools

g++ search path

 
 
kramer31
Guest
Posts: n/a
 
      07-29-2007
Hi. Can anyone tell me how to find the g++ search path (for include
files)? I run Gentoo Linux 2.6.

Thanks.

 
Reply With Quote
 
 
 
 
Gianni Mariani
Guest
Posts: n/a
 
      07-29-2007
kramer31 wrote:
> Hi. Can anyone tell me how to find the g++ search path (for include
> files)? I run Gentoo Linux 2.6.


This is OT for this NG - try a GCC forum next time.

This is what MakeXS uses:

$ touch _my__jnk.cpp
$ g++ -Wp,-v -c _my__jnk.cpp
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i6
86-pc-cygwin/include"
ignoring duplicate directory
"/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686
-pc-cygwin/lib/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include
/usr/include
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api
End of search list.


The MakeXS macro is like this:
MXS_GEN_STDINCLUDEDIRS_X=$(dir $(addsuffix /a,$(shell touch
_my__jnk.cpp; $(CXX) -Wp,-v -c _my__jnk.cpp 2>&1 | grep " /" ; rm -f
_my__jnk.* ) ) )

It creates a single list of dirs like so in gmake.

/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/
/usr/lib/gcc/i686-pc-cygwin/3.4.4
/include/c++/i686-pc-cygwin/
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/ /usr/include/
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/

There may be easier ways of doing this so you really should ask the GCC
fellas.
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server.MapPath() croaking with "failed to map path", but path is legal awbacker@gmail.com ASP .Net 0 05-12-2005 10:50 PM
Compiling when libedit is in path Is there a trick to compiling Ruby when libedit must exist in the search path? Can you statically link to readline 5.0 in some manner? -- Lon Baker Lon Baker Ruby 1 03-21-2005 08:57 AM
search within a search within a search - looking for better way...my script times out Abby Lee ASP General 5 08-02-2004 04:01 PM
Bizzare: Invalid path to Access mdb, path is good Keith-Earl ASP .Net 1 05-03-2004 03:25 PM



Advertisments