static vs. shared linking

David Stacey drstacey@tiscali.co.uk
Wed Mar 25 23:29: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.

As a quick test, I moved all of the inlined code from crash_library.h 
into the cpp file, as I wanted to rule out some crazy inlining problem. 
As expected, the shared library version still crashed.

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