NVIDIAGameWorks / PhysX

NVIDIA PhysX SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Library Mismatch on Windows

Kai-Indiemade opened this issue · comments

Hi there, I've linked the .lib files to my project using cmakelists, however I git this error:
LNK2038 mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in test.main.obj
File: D:\VisualStudioProjects\test\out\build\x64-debug\PhysXExtensions_static_64.lib(ExtDefaultErrorCallback.obj)

I don't know if this is normal, but the following libraries have _static in the name, the others do not:
PhysXExtensions_static_64.lib
PhysXPvdSDK_static_64.lib
PhysXVehicle_static_64.lib
PhysXCharacterKinematic_static_64.lib

I think that is the problem. I tried setting these to False in the build preset, but there seemed to be no difference:
PX_GENERATE_STATIC_LIBRARIES
NV_USE_STATIC_WINCRT

I am using a custom preset, but it's just a copy-paste of vc16win64.xml just to change it to use vc17 so that I could build the project with Visual Studio 2022.

I've seen older issues where people had the same version, but I was unable to solve the issue with the suggested solutions in those threads.

I meant to put this on NVIDIA-Omniverse/PhysX