This is the mail archive of the
mailing list for the Cygwin project.
Re: Building DLLs on C++ version code failed, but okay on C version code.
- From: Greg Chicares <gchicares at sbcglobal dot net>
- To: cygwin at cygwin dot com
- Date: Sun, 04 Jul 2010 11:10:50 +0000
- Subject: Re: Building DLLs on C++ version code failed, but okay on C version code.
- References: <firstname.lastname@example.org>
On 2010-07-04 10:24Z, kenny@ca wrote:
> $gcc -c hello.c
> $gcc -shared -o hello.dll hello.o
> I successufully built it as DLL, hello.dll.
Here, the C runtime library is automatically linked.
> Then, I rewrote it in c++.
> Then, I used the commands above to built DLL, but it failed. Why did it
Use 'g++' instead of 'gcc' for C++:
g++ -c hello.cpp
g++ -shared -o hello.dll hello.o
Then the C++ standard library is automatically linked.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple