Reputation: 958
We are using the FFMpeg static libraries compiled via the --toolchain=msvc switch with the VS2010 compiler linked to the static runtime (-MT). These libraries work fine but they are linked to libcmt.lib.
We would like to compile a debug build of these libraries (i.e. linking against libcmtd.lib). In the configure call I added:
./configure --toolchain=msvc --enable-debug --arch=x86 --extra-cflags=-MTd
This will result in some calls to cl.exe with the -MTd switch but also some with the -MT switch and cause conflicts in the linker stage.
What am I missing?
Upvotes: 1
Views: 4417
Reputation: 958
I managed to solve this by using the following configure switches:
./configure --toolchain=msvc --enable-debug --arch=x86 --extra-cflags="-MTd" extra-cxxflags="-MTd" --extra-ldflags="-nodefaultlib:LIBCMT"
Upvotes: 3