PhysX SDK 3.2.2. Windows libraries are badly compiled

Hi,
there’s a nasty problem with how the PhysX SDK 3.2.2. distribution libraries are compiled.
All the Windows libraries (.libs) in the current SDK contain these linker flags: “/FAILIFMISMATCH:”_MSC_VER=1600" /FAILIFMISMATCH:“_ITERATOR_DEBUG_LEVEL=0"”

I’m not sure what the second flag does, but the first command stops all other versions of Visual C++ than 2010 from linking against them. I’d suggest removing both flags from future releases, as they are bound to be only a nuisance.

Personally, I had to hex edit the commands away from all the libraries before I could use them on VS 2012. In case anyone else is having the same problem, just search for that string in the library files and replace it with an equal amount of spaces, using a hex editor.

I’ve encountered the same. I left a comment on the support discussion page. Part of the binaries labeled for CHECKED or DEBUG appear to have been compiled as RELEASE so you get _ITERATOR_DEBUG_LEVEL and version issues.

Just reporting in that they did not fix this problem in the 3.2.3 SDK.

Also, it’s not just the debug builds; the MSC_VER problem exist with every library file, including release. And I’m not feeling like fixing their libraries by hand every time a new version comes out, so for this reason and so many others I’m pretty close to abandoning the 3.x SDK and going back to 2.8.

3.x has been nothing but trouble for my project, so far.

Hi,

I apologize for the delay. Support for VS2012 has been slow because of problems we’ve encountered with that version. I’ll ask the build team to re-build a 3.2.3 core distro using VS2012 and publish a patch.

Thanks,
Mike

Hi,

Please log in to the downloads site and find PhysX-3.2.3_PC_SDK_Core_patched_MSC_VER.zip. I believe this will fix the MSC_VER problem.

Thanks,
Mike

Hi Mike, thanks for the quick work on this problem.
However…

1>PhysX3Extensions.lib(ExtJointRepXExtensions.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtExtensions.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtDefaultCpuDispatcher.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtD6Joint.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtDistanceJoint.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtFixedJoint.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtPrismaticJoint.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtRevoluteJoint.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtSphericalJoint.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtMetaData.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtCpuWorkerThread.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtD6JointSolverPrep.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtJoint.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtDistanceJointSolverPrep.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtFixedJointSolverPrep.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtPrismaticJointSolverPrep.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtRevoluteJointSolverPrep.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysX3Extensions.lib(ExtSphericalJointSolverPrep.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PhysXProfileSDK.lib(PxProfileEventImpl.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>PxTask.lib(CudaWrapper.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>RepX3.lib(RepX.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>RepX3.lib(RepXCoreExtensions.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>RepX3.lib(FastXml.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj
1>RepXUpgrader3.lib(RepXUpgrader.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Main.obj

… this is what happens now.
The problem of course is that the PhysX libraries are linked against a static runtime library, while my project (and all the other libraries I’m using) are linked with the dynamic runtime.
Why does PhysX link with static runtimes instead of dynamic?
I’m no expert on the subject, but to my knowledge that’s generally bad practice.

I’ll try to recompile my 3D engine and GUI + input libraries against the static runtime for now, in the hope that these new PhysX libraries would resolve my rather more serious problem described here

EDIT: Nope, did not fix my primary problem (in the other thread)

Hi,

I´m using Visual Studio 2012 - and compiled the PxController and the PxExtensions with it.
Only the PhysxProfileSDK____.lib needs to get fixed - and you dont need to delete the whole MSC entry inside the .lib. ( Its maybe a little bit dangerous to delete it )
You can only edit the _MSC_VER=1600 to _MSC_VER=1700 and it works.

The offset for the value is 000695E0 - I´ve used HxD as hex editor.

So there are no problems anymore.
( I didnt test the version from MikePhysX, because it works fine )

Hi there. Is that patch still available? I can’t find it neither in https://developer.nvidia.com/rdp/physx-downloads or in http://supportcenteronline.com/ics/support/default.asp?deptID=1949

Thanks, Dario

Hi.

The patch is still aviable - but I guess its better to use the newer PhysX 3.2.4 - it does have nativ support for VS 2012.

You just have to dig a little bit to find it:
0. Login in the Support Center: http://supportcenteronline.com/ics/support/default.asp?deptID=1949

  1. Click on Online Support
  2. Click on Downloads (direct below Online Support)
  3. Click on more in the PhysX SDK 3.2 colum
  4. Scroll down and select PhysX-3.2.3_PC_SDK_Core_patched_MSC_VER.zip

And of course, the newer PhsyX 3.3x is comming!