> 
> Simson Garfinkel schreef op do 15-09-2011 om 17:06 [+0100]:
>> I am having a problem creating multi-threaded executables that are 
>> statically linked. Even though I am using the -static flag, the resulting 
>> executable has a dependency for pthreadGC2.dll. Unfortunately, for my 
>> application we do not wish to have ANY DLL dependencies.
>> 
>> Here is my linkage line:
>> 
>> x86_64-w64-mingw32-g++  -D_FORTIFY_SOURCE=2 -Wall -g -Wno-format  --static 
>> -mthreads   -o tigerdeep.exe md5.o sha1.o sha256.o whirlpool.o tiger.o 
>> main.o hashlist.o multihash.o display.o hash.o dig.o helpers.o xml.o files.o 
>> threadpool.o  -lws2_32 -lgdi32 -liberty -lpthread
>> 
>> The problem seems to be that all of the libraries have been built for 
>> dynamic linking.
> 
> Hi,
> 
> This is expected behaviour. The mingw{32,64}-pthreads package only
> contain shared libraries at the moment so even if you specify the
> '-static' compiler flag it will still create a dependency on the
> pthreads dll.
> 
> You might want to look into the possibility of adding support for a
> static pthreads library to the mingw-pthreads package and creating a
> mingw{32,64}-pthreads-static subpackages.
> 
> Kind regards,
> 
> Erik van Pienbroek

Hi, Erik. Thanks for the email.

I'm not really sure how to create a package. Is there a reason why the single 
package can't have both static and dynamic options?  I would think that the 
--static flag would be used to determine which of the two libraries would be 
used. 

In any event, I have been able to compile a static version and am using it 
locally. Yes, I'd like to make a package, if you can point me to directions. 

Regards,

Simson

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
mingw mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/mingw

Reply via email to