This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc with std::multimap




I'm using cygwin on win2k . And for a simple test that use std::multimap
I receive some undefined like: << undefined reference to 'cout' >> when I compile with gcc. I every think
is fine if I compile with c++. What is the difference ???

( I have try included every think : iostream, stdlib, and of course map and algorithm header but the 1 exit estatus
still. )
This is a gcc question - not a cygwin question - also it is answered in the message archives. Using gcc with c++ code will be unlikely to work, certainly if you are using anything from the standard c++ libraries. the std c++ libraries are Not linked in when you use gcc, but are with c++/g++. There is also sometimes other differences between gcc and using g++, but the main one is that it does not add the standard c++ library to the link line.

Gareth

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com


--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/


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