Trying to compile a simple C++ program

Andrew Markebo flognat@flognat.myip.org
Sun Feb 11 02:26:00 GMT 2001


/ 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



More information about the Cygwin mailing list