Question

I had all my code compiling under a system that had gcc 4.1.1 and g++ 4.1.1. IT just gave me another system , that had gcc 4.1.2 and g++ 4.1.2. When I run with -v option, it says

ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../x86_64-redhat-linux/include"

However find gives me this

find /usr -name stddef.h
/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h

How do I force gcc to use a different search paths for i386 and 4.1.1, rather than 4.1.2 and x86_64 ?

Was it helpful?

Solution

This would indicate that the installation of gcc isn't complete. You may need to install (e.g. sudo yum install libstdc++-devel glibc-devel). This will work assuming that the gcc was actually installed using the standard packages from redhat. You may of course need some other libraries too, depending on what you are actually developing.

Of course, the RIGHT thing to do is to complain to IT, but I suspect that if you want some work done today (if your IT is anything like the ones I've worked with), you're better off doing it yourself, if you at all can do that. (Oh, and most of the time, in my experience, they have no idea how to solve the problem, so give them the above information!).

OTHER TIPS

You can extend searched with -I for includes and -L for libs parameter followed by desired paths. See more in the documentation or this answer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top