Path: chuka.playstation.co.uk!news From: "Steve Dunn" Newsgroups: scea.yaroze.programming.gnu_compiler Subject: Re: C++ Include paths Date: Mon, 16 Feb 1998 18:15:34 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 107 Message-ID: <6c9vn7$beo20@chuka.playstation.co.uk> References: <6c6f9n$beo3@chuka.playstation.co.uk> <6c6vj7$beo4@chuka.playstation.co.uk> NNTP-Posting-Host: usera830.uk.uudial.com X-Newsreader: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Hi again Thanks for the info. The CPLUS_INCLUDE_PATH thing worked. I've developed a simple little test program, and I seem to be having all sorts of problems. File Test.h ....................... #ifndef TEST_H_INCLUDE #define TEST_H_INCLUDE class CTest { protected: int m_n ; public: CTest( int ) ; virtual void print( ) ; }; #endif //TEST_H_INCLUDE ............................ File main.cpp ............................. #include ...{{ the relevant headers }} CTest::CTest( int n ) { m_n = n ; } void CTest::print( ) { printf("goodbye sanity" ) ; } ............................. and I now get this ............................. /psx2/bin/ld.exe: warning: global constructor _GLOBAL_$I$__always_have_this_glob al used main.o: In function `CTest type_info function': test.h(.text+0xd4): undefined reference to `__rtti_user' test.h(.text+0xd4): relocation truncated to fit: JMPADDR __rtti_user NMAKE : fatal error U1077: '\psx2\bin\ld.exe' : return code '0x1' Stop. ............................ When I take out the 'virtual' from the 'print' declaration, it works fine, although the output file 'demo' is almost 20k ! P.S. I've done a 'bit' of research (in the gcc .txt file), and can find no mention of this problem. Yours going berzerk Steve Graeme Evans wrote in message <6c6vj7$beo4@chuka.playstation.co.uk>... >DOh! > >If anyone's going to help you solve this Steve, I think you better tell them >what the problem is :) > >When I compiled gcc, I set the install path to be /psx2/ - this gets >compiled into the code. You put it on a zip disk or something on the E:\ >drive when your make utility and VC++ environment are on your C:\ drive. So, >the current drive for finding include files and stuff is on the C:\ drive >and the compiler cant find stuff. > >What you want to know is, with the cygwin32 port of the gcc tools, is there >a way of setting environment variables to direct the compiler to override >the default paths so you can put an E:\ in there. > >The best place to find out this sort of info is >www.netyaroze-europe.com/yaroze/ftp/manuals/gnu/gnucc.txt and I just had a >wee looksie. There are different environment variables for C, C++ and >Objective C include paths. Have you tried setting CPLUS_INCLUDE_PATH to >E:\psx2\lib\gcc-lib\mips-unknown-ecoff\cygnus-2.7.2-970404\include ?????? >(maybe need to set LIBRARY_PATH too if you cant pick up libps, I use the one >in c:\psx\lib, experiment!) > >If you cant find any variables that do the trick, my next suggestion was >going to be to >add -IE:\psx2\lib\gcc-lib\mips-unknown-ecoff\cygnus-2.7.2-970404\include to >your cflags in your makefile > >Gil, did I get this right? > >Graeme > >