static vs. shared linking

David Stacey drstacey@tiscali.co.uk
Tue Mar 24 18:50:00 GMT 2015


On 24/03/2015 00:02, David Stacey wrote:
> I've been having difficulty building poco-1.6.0 for Cygwin for some
> time. I've managed to produce a test case that shows the problem:
>
> https://dl.dropboxusercontent.com/u/119453582/Cygwin/crashtest.tar.xz
>
> This archive contains source files that produce a very simple library.
> When linked statically, the code works fine. However, when linked as a
> shared DLL, the test crashes with a core dump. The behaviour is
> identical on x86 and x86_64 architectures.
>
> Have I made a stupid error in the compilation of the shared case, or is
> something more interesting going on?

I don't know if anyone has managed to look at this. I haven't had a 
deluge of e-mails telling me that I've done something silly (which is a 
shame, because then I could fix it quickly and move on). For the sake of 
a straw to clutch at, I tried compiling with clang++ rather than g++, 
and got the same result:

     $ ./go.sh
     Running test (static link)...
     Done.

     Running test (shared link)...
     ./go.sh: line 19:  3744 Aborted                 (core dumped) 
./shared_test
     Done.

Any help or hints would be greatly appreciated.

Dave.



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



More information about the Cygwin mailing list