Posts: 118
Joined: Apr 2017
Reputation:
0
2018-09-23, 04:48
(This post was last modified: 2018-09-29, 19:28 by MatthewLundberg.)
I'm trying to build a plug-in using VS2017, but the character encoding in the cmake-generated solution is wrong. It's set to multibyte, whereas Kodi itself specifies unicode (Kodi is also built with VS2017).
I can't figure out how Kodi was configured to specify unicode rather than multibyte. I don't see anything in the CMakeLists.txt about the character encoding. Can someone please lend me a clue?
Posts: 785
Joined: Feb 2015
Reputation:
38
Rechi
Team-Kodi Member
Posts: 785
Have you passed -DCMAKE_USER_MAKE_RULES_OVERRIDE=<KODI-GIT-DIR>/cmake/scripts/windows/CFlagOverrides.cmake and -DCMAKE_USER_MAKE_RULES_OVERRIDE_CXX=<KODI-GIT-DIR>/cmake/scripts/windows/CXXFlagOverrides.cmake to cmake?
Posts: 118
Joined: Apr 2017
Reputation:
0
Thanks for the reply.
I did pass those command-line arguments to cmake when configuring the build. The paths were generated (from %~dp0) but I checked to see that the expanded values point to the actual files (they do). And clearly these files do contain the flags that I need. How do I go about debugging this situation? Any further ideas?
Posts: 118
Joined: Apr 2017
Reputation:
0
Four days later, and I have tried everything that I can find online. I even copied the lines from the override files that need to be used, and put them in the CMakeLists.txt (without the "if" checks). Still I get a solution that is multi-byte character set, and of course will not build.
This is getting to be extremely frustrating.
Is there something different about VS2017, where defining UNICODE and _UNICODE are not enough to force unicode character set? Kodi has it in its generated solution. I am using VS2017 because I am unable to get VS2015 to install the 10.0.14393 SDK -- the SDK fails to install for me, and I'm apparently not alone.
Any clues? I'm trying to get a plugin building with cmake so I can submit it, and this is blocking me. It builds and runs fine on Linux, but that's Linux.
Posts: 118
Joined: Apr 2017
Reputation:
0
This was my error. I had forked the p8-platform code from the wrong location (from pulse-eight instead from xbmc) and thus did not see any upstream updates. The Windows code is completely different in the two locations.