Hello Earnie,
On Mar 4, 2013, at 1:25 PM, Earnie Boyd wrote:
> On Mon, Mar 4, 2013 at 5:01 AM, Sebastian Wolff wrote:
>>
>> I modified the specs according to the Jon's summary of your recommendations,
>> i.e.:
>> - use -lmsvcr90 instead of -lmsvcrt
>> - use -static
>> - avoid linking against -lmoldname
>> - use the define -D__MSVCRT_VERSION__=0x0900 when compiling *.cpp
>>
>
> In order to avoid multiple runtime DLLs based on your new specs file
> you'll need to ensure that every DLL being used by the program is in
> fact using the same runtime DLL. If you want to use the static
> versions be sure to use -static as well as -static-gcclib or
> -static-libstdc++ if you're doing C++.
This is exactly, what I am doing. I even recompiled GCC to provide only static
libs. Here is the compile command:
$CC -Wl,-v -v -specs specs_msvcr90 -DMINGW_HAS_SECURE_API=1 \
-O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 \
--param=ssp-buffer-size=4 -mms-bitfields -fno-keep-inline-dllexport \
-O2 -mthreads -Wall -frtti $SOURCES $LIBDIR $INCDIR $MYLIB \
-lruntmchk -lole32 -loleaut32 -lWbemUuid -lws2_32 -lcomctl32 \
-lcomdlg32 -lnetapi32 -static-libgcc -static-libstdc++ -static
I also checked all DLLs in Dependency Walker. The following DLLs reference
msvcrt.dll: advapi32.dll, comdlg32.dll, netapi32.dll, ole32.dll, oleaut32.dll,
ws2_32.dll
Comparing this with the VC++-built executable gives similar implicit
dependencies on msvcrt.dll. There are 2 differences: No direct dependency on
msvcrt.dll and no dependency on ws2_32.dll
Are you sure that every used DLL must depend on the same runtime? I guess most
Windows applications use DLLs which use the system MSVCRT.dll rather than
msvcr90.dll. So does my 'working' version compiled with VC++. The only
difference is that the main program itself depends on a single runtime only.
Thanks for your response and time.
Best regards
Sebastian
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public