Mail Archives: djgpp/2004/05/06/13:45:35
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
From: | "wordsworth" <news AT callera DOT net>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: DJPGG and Windows XP Professional + I think a Undefined Reference or linker problem
|
Date: | Thu, 6 May 2004 18:30:17 +0100
|
Lines: | 119
|
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: | <409a7633_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:30:30 +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
|
sorry, should have been paying attention to the listing
I have now tried gpp that compiles my prog. So what is the difference
between gcc and gpp
can I fine tune gcc to get to the bottom of my original problem
cheers
"wordsworth" <news AT callera DOT net> wrote in message news:...
> 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 <X> header for the <X.h> header for C++ includes,
> or <s
> stream> instead of the deprecated header <strstream.h>.
>
> To disable this warning use -Wno-deprecated.
>
> g:/djgpp/tmp/ccP5P7He.o(.text+0x22):test.cc: undefined reference to
> `std::basic_
> ostream<char, std::char_traits<char> >& std::endl<char,
> std::char_traits<char> >
> (std::basic_ostream<char, std::char_traits<char> >&)'
>
> 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<char, std::char_traits<char> >& std::operator<<
> <std::char_traits<char>
> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
> g:/djgpp/tmp/ccP5P7He.o(.text+0x3d):test.cc: undefined reference to
> `std::basic_
> ostream<char, std::char_traits<char>
>::operator<<(std::basic_ostream<char,
> std:
> :char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char>
> >&))'
> 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 <iostream.h>
>
> 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.
>
>
- Raw text -