#1485 dll dependencies messed linking rc 64-bit


I can build a 64-bit executable linked to the TclTk85 libraries, but if I also include an rc object (produced by the 64 bit version of windres) when linking it, the resulting .exe fails to start. Instead I get the error "Application failed to initiate properly 0xc000007b". This diagnosed as the result of mixing 32 and 64 bit dll dependencies so I got Dependency Walker and had a look. Sure enough, if the app is built with rc.o linked, it depends on tk85.dll and that depends on a 32-bit version of COMCTL32.DLL. If the app is built with no rc.o, it depends on _the_same_ version of tk85.dll (same filename and everything) but that now depends on the correct 64-bit COMCTL32.DLL -- and it starts and runs OK! WTF?
$ gcc -v
Using built-in specs.



Target: x86_64-w64-mingw32

Configured with: ../../../build/gcc/src/configure --target=x86_64-w64-mingw32 --prefix=/c/bb/vista64-mingw32/mingw-x86-x86_64/build/build/root --with-sysroot=/c/bb/vista64-mingw32/mingw-x86-x86_64/build/build/root --enable-languages=all,obj-c++ --enable-fully-dynamic-string --disable-multilib

Thread model: win32

gcc version 4.5.2 20101015 (prerelease) (GCC)

$ ld -v
GNU ld (GNU Binutils)

$ uname -a
MINGW32_NT-6.1 SPACEHOPPER 1.0.11(0.46/3/2) 2009-07-11 17:46 i686 Msys


  • Chris Sutcliffe

    Chris Sutcliffe - 2011-03-05

    I believe this is a feature request for mingw-w64, which maintains its own w32api.

  • Chris Sutcliffe

    Chris Sutcliffe - 2011-03-05
    • status: open --> pending
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

  • SourceForge Robot

    • status: pending --> closed

Log in to post a comment.