Runtime Linking Issues when compiled with game engine

I grabbed the source code from Github and compiled the PhsyX solution inside source\compiler. I am using VS 2013 and the game engine is a static library.

I’m receiving the following error(s):

Error 41 error LNK2038: mismatch detected for ‘RuntimeLibrary’: value ‘MTd_StaticDebug’ doesn’t match value ‘MDd_DynamicDebug’ in Sample-01-BlueWindow.obj C:\Users\Skertich\Documents\Visual Studio 2013\Projects\SIC32\Samples\Sample-01-BlueWindow\PhysX3ExtensionsDEBUG.lib(ExtDefaultErrorCallback.obj) Sample-01-BlueWindow
Error 40 error LNK2038: mismatch detected for ‘_MSC_VER’: value ‘1700’ doesn’t match value ‘1800’ in Sample-01-BlueWindow.obj C:\Users\Skertich\Documents\Visual Studio 2013\Projects\SIC32\Samples\Sample-01-BlueWindow\PhysX3ExtensionsDEBUG.lib(ExtDefaultErrorCallback.obj) Sample-01-BlueWindow

Sample-01-BlueWindow is a C++ application using the game engine. The game engine has the Phsyx 3.3.3 libraries in it. I compiled the Physx3 solution as MDd - am I not suppose to?

Nevermind - I just had to make sure the project configuration was correct. I then had to make sure the DLL’s were inside the application folder. Oddly enough I compiled the Phsyx 3 code using VS 2013 and it kept on showing me _MSC_VER mismatch 1700 doesn’t match value 1800 coming from the PxPhysxExtensionsDEBUG.lib probably got the file name wrong but it the Physx Extensions library. So I set the game engine library to VS2012 and it stopped complaining.

Although perhaps you guys can tell me there’s a way I can compile the engine as VS2013 because inside the /source/compiler/vs12win32 I compiled everything as VS 2013 and Multi-threaded debug.

That’s odd. I’m not sure why that is happening, but I can say that problems like this one were motivating factors in our decision to provide the PhysX source code to everyone. Compiler issues made it difficult to support binary distribution. We’ll keep an eye out for this situation in our testing.

Thanks Mike for the response! I noticed when I compile the PhysX libraries as /MDd it gives me loads of runtime mismatch erros with my game engine. If I compile the PhysX libraries as /MTd it’s fine but then I have to change my engine samples and my game engine to the same /MTd amongst other libraries I’m using.

I’m glad you guys are working on it. Let me know when everything is resolved because sadly PhysX can’t be wrapped inside the game engine quite well. Also I copied the PhysX DLL files in the project folders as well - just have the functions wrapped inside the engine.

Keep me up to speed on how everything’s coming along with the resolved issues Mike.

Mike, if I was able to compile PhysX as a MDd for debugging then I should be good to go with PhysX. When i remember the PhysX3Extentions_Debug.lib gave me issues when I was trying to compile everything as a MDd saying there was a runtime mismatch from MTd to MDd pointing to the PhysX3Extentions. I recently compiled the BulletPhysics for MDd and it works like a charm.

Good news is that I have the ability to use Bullet Physics or PhysX with a preproessor directive. So until I get more of a idea how I can compile PhysX to MDd then It would make my cheeks glow with glee.

Other than that PhysX being compiled as MTd are not settling with ASSImp’s libraries (Most definately the main issue). If I’m compiling the engine, physX as MTd and Assimp library is compiled as MDd that would explain why I’m getting a hell lot of LINK2005 errors saying: _memmove is already defined…blah blah.

Thanks if you can help or possible keep me up to date on what’s going on with the newest github release.

Did you change the extension library to MDd as well? It’s a separate project. You’ll have to change the flag in multiple projects.

I’ll have to try that some time today and come back to you on what happens. Thanks Mike!

High Five to Mike

Yup, that did the trick! When the PhysX is initialized I have a message box showing me that it was successfully initialized. I’m not sure what really caused the issues before. Perhaps rushing everything.

Thanks again Mike!

Lucky guess. Glad it helped!