From: jcassidy AT stratos DOT net ("James M. J. Cassidy") Subject: Re: Embarassing question on linking 26 May 1997 18:49:04 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Original-To: Allan Peda Original-cc: "gnu-win32 AT cygnus DOT com" In-Reply-To: <3389D542.523C@interport.net> Original-Sender: owner-gnu-win32 AT cygnus DOT com On Mon, 26 May 1997, Allan Peda wrote: > I am learning C++ using cygwin32, so I am not too well versed in these > unix type utilities (previous experience with IDE based products). > > I'll cut to the chase.. hello world based C++ program yields the > following: > > The code: > > bash$ cat hellopp.cc > #include > > main() > { > cout << "Hello there GNU++ world!\n"; > } > bash$ > > The error: > > bash$ make -f hellopp.mak > /gnuwin32/b18/H-i386-cygwin32/bin/gcc.exe -pedantic -o hellopp.exe > hellopp.cc Add '-lg++' to the line above > C:\TEMP\cc0010051.o(.text+0x2a):hellopp.cc: undefined reference to > `cout' > C:\TEMP\cc0010051.o(.text+0x2f):hellopp.cc: undefined reference to > `ostream::ope > rator<<(char const *)' > gcc.exe: Internal compiler error: program ld got fatal signal 1 > make: *** [hellopp.exe] Error 1 > > Now under hello.c, I have no errors, I'm guessing that I need to do > something to link the correct libraries which are needed under (G)C++, > and were included by default under GCC (ansi). > > Thanks > Allan > > (Yes, I am reading the notes at cygnus, and am looking into > prep.mit.edu) > - > For help on using this list (especially unsubscribing), send a message to > "gnu-win32-request AT cygnus DOT com" with one line of text: "help". > - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".