NVIDIAGameWorks / PhysX

NVIDIA PhysX SDK
Other
3.11k stars 793 forks source link

Library Mismatch on Windows #635

Closed Kai-Indiemade closed 1 year ago

Kai-Indiemade commented 1 year ago

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.

Kai-Indiemade commented 1 year ago

I meant to put this on NVIDIA-Omniverse/PhysX