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: Problem compiling cpp programs with gcc-3.2-1


> gcc -O2 -mno-cygwin -mwindows short.cpp  \
> -lkernel32 -luser32 -lgdi32 -lwinspool \
> -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 \
> anv.res -o short

Note also that if you are going to compile a C++ program, you should use
g++, not gcc as your above.  Among other things it links in the standard
library wherein things such as new and cout etc are found.

Wayne Keen

--
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]