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


On Sun, Feb 11, 2001 at 11:25:37AM +0100, Andrew Markebo wrote:
>/ 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++ 

g++ -o a.exe a.cpp

is the correct way to compile a g++ program.  You shouldn't need an extra
-lstdc++.

cgf

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