This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: String.h


Hi  GCC gurus,

I wrote yesterday:
> My program is not able to include String.h.. Any ideas why this is
> happening?

Thanks Mark, Mike, Carlo and Robert for the responses.

Unfortuantely, I still have nt figured out why my g++ is not putting
/usr/local/lib/g++-include in the include dirs. I tried -I -isystem <dir>
and a few other options; it does not work.

The problem again is my program is not  able to use any of the files
/usr/local/lib/g++-include directory.  g++-include directory does not come
in the path at all. I tried including <string> and <cstring> and they dont
include <String.h> at all.

Simple test program:
----------------------------
unix:/home/alex/ % cat test.cpp
#include <String.h>
int
main ()
{
return 0;
}

Compilation:
----------------
unix:/home/alex/ % g++ test.cpp
launch.cpp:4: String.h: No such file or directory

(More Info)

unix:/home/alex/ % g++  -v launch.cpp
launch.cpp:4: String.h: No such file or directory
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)

/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/cpp0 -lang-c++ -v -D__GNU
C__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dsparc -Dsun -Dunix -D
__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__s
parc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__EXCEPTIONS -D__GCC_N
EW_VARARGS__ -Acpu(sparc) -Amachine(sparc) launch.cpp /var/tmp/cczVAIut.ii
GNU CPP version 2.95.3 20010315 (release) (sparc)
#include "..." search starts here:
#include <...> search starts here:

/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/../../../../include/g++-3
 /usr/local/include

/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/../../../../sparc-sun-sol
aris2.8/include
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
launch.cpp:4: String.h: No such file or directory


But the file is actually there:
====================
unix:/home/alex% ls -l /usr/local/lib/g++-include/String.h
-rw-r--r--   1 root     other      34423 Feb  3  1999
/usr/local/lib/g++-include/String.h

It is a solaris 8, running g++ 2.95.3
dhania:/home/alex/ % uname -a
SunOS dhania 5.8 Generic_108528-01 sun4u sparc SUNW,Ultra-60

dhania:/home/alex/ % which g++
/usr/local/bin//g++

dhania:/home/alex/ % g++ -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)



I tried configuring my g++ myself (instead of using the sunfreeware binary)
building  and installing, I still get the same error.

Any help would be really appreciated.

Thanks
Alex






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]