Kodi Community Forum
PVR, CMake, MSVCRT linking problem in Win32 - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: PVR, CMake, MSVCRT linking problem in Win32 (/showthread.php?tid=224879)



PVR, CMake, MSVCRT linking problem in Win32 - zcsizmadia - 2015-04-20

Hi All,

I'm developing a PVR dll using the latest CMake method. I have some weird linking problem in Win32.

By default the project and depend libs are built using /MD (dynamic linking) and my code hangs in very simple msvcrt functions like file open, fileno, etc.
If I am overriding MD to MT in all libraries, everything is working well.

I suspect the problem is when Kodi hooks the msvcrt functions after loading my dll.

BTW I am using the following cmake rules:

...
-DCMAKE_BUILD_TYPE=Release
-G "Visual Studio 12"
-DCMAKE_USER_MAKE_RULES_OVERRIDE = "...\xbmc\project\cmake\scripts\windows\c-flag-overrides.cmake"
-DCMAKE_USER_MAKE_RULES_OVERRIDE_CXX = "...\xbmc\project\cmake\scripts\windows\cxx-flag-overrides.cmake"

Best regards,
Zoltan


RE: PVR, CMake, MSVCRT linking problem in Win32 - zcsizmadia - 2015-04-20

It seems like it is ok with Kodi 15.0, the problem is only with (<=?) 14.2.

Is the new PVR CMake infrastructure supported by 14.2 as well?

Zoltan


RE: PVR, CMake, MSVCRT linking problem in Win32 - ironic_monkey - 2015-04-20

no it is new in 15