X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "wordsworth" Newsgroups: comp.os.msdos.djgpp Subject: DJPGG and Windows XP Professional + I think a Undefined Reference or linker problem Date: Thu, 6 May 2004 18:11:13 +0100 Lines: 96 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: <409a71b4_1@mk-nntp-2.news.uk.tiscali.com> X-Original-NNTP-Posting-Host: 80.225.2.151 NNTP-Posting-Host: mk-nntp-2.news.uk.tiscali.com X-Trace: 6 May 2004 18:11:19 +0100, mk-nntp-2.news.uk.tiscali.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com hello, - I have now pulled all my hair out after wasting another day messing around with no succuss. I was working though Steves Heller (excellent book) Learning to Program C++ which uses code provided and DJGPP compiler, contained on the CD. I have come back to this book after sometime and was setting the compiler up on my current Windows XP Professional PC. It worked a few years ago when I was running Win98 but not now. Anyway.... that was just background info..... I have installed and configured DJGPP according to all documentation the update version (v2.04) from the web site (the cd version did not work either). It should work but it does not. to test (only one example provided here but it happens with all probs - I've set env stuff correctly (according to instrutions) ) gcc test.cc -o test.exe you will see below the results - a warning is given about depreciated headers which can be suppressed with "-Wno-deprecated" being added but the test.cc will not compile. iosteams.h header file is there but I seem to need to do something extra with the linker BUT I do not know what to do. Adding extra syntax to the gcc command may solve the problems (which would be a good step) but does not explain the cause of the problem. With my gnu cc complier exp on linux I would just add path to extra include area and ld -v and this would get arround any head.h/ lib file issues. ahhhhhhhhhhhhhhhhhhh :-) any suggestions thanks ================================================================= G:\DJGPP\mystuff\code>gcc test.cc -o test.exe In file included from g:/djgpp/lang/cxx/3.33/backward/iostream.h:31, from test.cc:1: g:/djgpp/lang/cxx/3.33/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider usin g one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated. g:/djgpp/tmp/ccP5P7He.o(.text+0x22):test.cc: undefined reference to `std::basic_ ostream >& std::endl > (std::basic_ostream >&)' g:/djgpp/tmp/ccP5P7He.o(.text+0x2f):test.cc: undefined reference to `std::cout' g:/djgpp/tmp/ccP5P7He.o(.text+0x34):test.cc: undefined reference to `std::basic_ ostream >& std::operator<< >(std::basic_ostream >&, char const*)' g:/djgpp/tmp/ccP5P7He.o(.text+0x3d):test.cc: undefined reference to `std::basic_ ostream >::operator<<(std::basic_ostream >& (*)(std::basic_ostream >&))' g:/djgpp/tmp/ccP5P7He.o(.text+0x6a):test.cc: undefined reference to `std::ios_ba se::Init::Init[in-charge]()' g:/djgpp/tmp/ccP5P7He.o(.text+0x89):test.cc: undefined reference to `std::ios_ba se::Init::~Init [in-charge]()' g:/djgpp/tmp/ccP5P7He.o(.eh_frame+0x11):test.cc: undefined reference to `___gxx_ personality_v0' collect2: ld returned 1 exit status ================================================================ test.cc (as you can see a simple test prog) ================================================================ #include int main() { cout << "Hello World!" << endl; } ================================================================= I think what is happending is ld is not picking up the e.g. iostream.h library file - but do not understand under windows what more I need to do. I have looked on the web and read the help stuff on the DJGPP but with little sucess.