I want to compile and link my project in Visual Studio 2008 as a Debug Project (MTd). This project includes several external dlls and one of those dlls are just as non-debug-versions available (MD and MT version). Now if I try to link my project it either says redeclaration of stuff in LIBCMT.lib and LIBCMTD.lib or if I try to not allow the non-debug-version (/NODEFAULTLIB:LIBCMT) it has missing symbols.
Now i could use the MT version of all external libs, but i still cant compile & link it as MTd version to debug my project, because of the same errors.
An alternative way (in my opinion) would be to allow redefinition which i thought is possible @ gnu compiler/linker, but i couldn't find anything about this for visual studio's c++.
Any ideas on how to handle this problem? (Remember: it's not possible to compile external dlls as debug-dlls)
As an additional general question: is it even possible to create a debug-project, which uses a non-debug-dll?
It looks like that the "correct" solution would be to rebuild all external libs with the same parameters (MTd). As I said, this is not possible. I solved the issue by not ignoring any defaultlibs. Instead i found the paramater i was looking for. In the linker options - additional lines I added: /FORCE
- which ignores the redefinition of symbols. This is not a perfect solution and it's possible that this won't work for any project - but it's still better than nothing...
In addition I had to set Incremental Link to NO, otherwise the embed.manifest won't build correctly (although I've read this could also be a anti-vir problem).