Kodi Community Forum
Kodi new compilation link errors (windows, VS 2022, main branch) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: Kodi new compilation link errors (windows, VS 2022, main branch) (/showthread.php?tid=371922)



Kodi new compilation link errors (windows, VS 2022, main branch) - bxr510 - 2023-02-10

Trying to compile it for the first time (followed the exact official instructions). Two errors:

"Severity    Code    Description    Project    File    Line    Suppression State Error    LNK2038    mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in WinMain.obj    kodi    C:\Users\boazn\kodi\kodi-build\pcrecpp.lib(pcrecpp.obj)    1    "
Severity    Code    Description    Project    File    Line    Suppression State Error    LNK2038    mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in WinMain.obj    kodi    C:\Users\boazn\kodi\kodi-build\pcrecpp.lib(pcrecpp.obj)    
1    

Any idea??


RE: Kodi new compilation link errors (windows, VS 2022, main branch) - Fuzzard - 2023-02-10

Use Release. I havent had Debug actually run inside VS, but havent bothered to work out whats going on. Your first error message is essentially saying its trying to use a Release version of the runtime, but its built against Debug.


RE: Kodi new compilation link errors (windows, VS 2022, main branch) - bxr510 - 2023-02-10

Worked, Thanks.
Now, is it possible to make the installer from VS? or I need to run the comp' again by buildsteps?


RE: Kodi new compilation link errors (windows, VS 2022, main branch) - Fuzzard - 2023-02-10

I honestly couldnt say. I thought there should be a target in the VS project that would create the installer, i just havent tried first hand sorry.

EDIT:
Looking at the BuildSetup.bat https://github.com/xbmc/xbmc/blob/master/tools/buildsteps/windows/BuildSetup.bat#L182-L237, it looks like the packaging is only available if you execute that batch script, and not from in the VS project.


RE: Kodi new compilation link errors (windows, VS 2022, main branch) - Stuggy - 2023-11-16

This just happened to me too.  I ran cmake for Kodi from the command line for Windows x64.

It seems like there is a debug/release conflict and pcrecpp is only being built as a release library.  When I switch the build to release in VS 2022 Kodi all builds. 

This makes debugging a bit of a problem.  I haven't found where in the cmake scripts Kodi builds pcrecpp.


RE: Kodi new compilation link errors (windows, VS 2022, main branch) - gujal - 2023-12-18

I may sound like a broken record, but will keep trying my luck anyway

Please, can the python dependency for the Kodi 21 Master Windows build be updated from the current 3.8.15 to 3.11.x please. The Windows build used to be the cutting edge for developing addons, but now it is lagging behind all other platforms.
Python 3.8 is already on extended support, and Extended support for Python 3.8 ends on October 2024


RE: Kodi new compilation link errors (windows, VS 2022, main branch) - Neo1973 - 2023-12-19

For the Kodi 21 release it's to late to bump the Python version for Windows. But people are actively working on making it possible to build Python as part of a normal Kodi build (like many other dependencies) and this should make it easier to keep Python up-to-date for all platforms, including Windows. For Kodi 22 Python for Windows should be back in line Smile