This is the mail archive of the cygwin@sources.redhat.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]

Re: Trying to compile a simple C++ program


/ Dan Plimak <danp@systematik.co.nz> wrote:
| [...]
| $ gcc -lstdc++ -o a.exe a.cpp

Throw -lstdc++ at the end and finally on the third try everything will
work and the sun will shine and birds will sing and yah you know all
of that.

        gcc -o a.exe a.cpp -lstdc++ 

Or you can do it the lazy-mans way, use g++ to compile c++ files, then
you don't need to worry about what extras you need to link in for c++
support.

        g++ -o a.exe a.cpp -lstdc++ 

        /Andy

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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