You're probably using the wrong DLLs, e.g. outdated DLLs, x64 vs x86 mismatch or DLLs with different runtime libraries. Make sure everything is matching and that you don't have old libraries and keep in mind that VS comes with two kinds of compilers, one for x86 and one for x64, you have to pick the right one.