Greetings. 

I'm now using mingw-w64 on Fedora Core 17. For those on this list who may 
remember me, my goal in using mingw-w64 is to create 64-bit binaries of my open 
source computer forensic tools for users who need to run Windows. I'm able to 
cross-compile on Linux or Mac or compile natively on Windows. I have to develop 
on both Mac and Linux.

In any event, I am now using the version of Fedora Core 17 that's in the 
repository. If I should be posting this elsewhere, please let me know.

The problem I am having is that 

I'm using the program to compile tcpflow, an open source computer forensics 
tool. Because it's a forensics tool, we prefer to have it statically linked.

I'm using:

x86_64-w64-mingw32-g++ (GCC) 4.7.0 20120322 (Fedora MinGW 4.7.0-2.fc17)

I'm compiling with these flags:

x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I.   -DPTW32_STATIC_LIB -DUNICODE 
-D_UNICODE -D__MSVCRT_VERSION__=0x0601 -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 
-DHAVE_STRUCT_TIMESPEC  -DUTC_OFFSET=-0400  -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 --static 
-static-libgcc -MD -D_FORTIFY_SOURCE=2 -Wpointer-arith -Wmissing-declarations 
-Wmissing-prototypes -Wshadow -Wwrite-strings -Wcast-align -Waggregate-return 
-Wbad-function-cast -Wcast-qual -Wundef -Wredundant-decls 
-Wdisabled-optimization -Wfloat-equal -Wmultichar -Wc++-compat 
-Wmissing-noreturn -mthreads  -MT md5.o -MD -MP -MF .deps/md5.Tpo -c -o md5.o 
md5.c

and linking like this:

x86_64-w64-mingw32-g++  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
--param=ssp-buffer-size=4 -Wno-format  --static -static-libgcc 
-static-libstdc++ -Wall -MD -D_FORTIFY_SOURCE=2 -Wpointer-arith -Wshadow 
-Wwrite-strings -Wcast-align -Wredundant-decls -Wdisabled-optimization 
-Wfloat-equal -Wmultichar -Wmissing-noreturn -Wstrict-null-sentinel 
-Woverloaded-virtual -Wsign-promo -funit-at-a-time -mthreads   -shared-libgcc 
-o tcpflow.exe datalink.o flow.o pcap_fake.o main.o tcpip.o xml.o util.o md5.o  
-lpthreadGC2 -lz -lws2_32 -lgdi32 

When I try to run under wine (where it's easier to do testing), I get this 
error:

err:module:import_dll Library libgcc_s_sjlj-1.dll (which is needed by 
L"Z:\\home\\simsong\\tcpflow\\src\\tcpflow.exe") not found
err:module:import_dll Library pthreadGC2.dll (which is needed by 
L"Z:\\home\\simsong\\tcpflow\\src\\tcpflow.exe") not found

I see the same error when I try to run under Windows natively.

Since I am providing both --static and -static-libstdc++ I am not sure what I'm 
doing wrong. Can someone make a suggestion?

Thanks,

Simson


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to