On 2010-07-04 10:24Z, ke...@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
> fail?

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
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply via email to