MingGW: windres.exe fails to parse charls.rc
SpaceIm opened this issue · 1 comments
windres.exe in MinGW doesn't like utf-8 and fails to parse charls.rc. Anyway, maybe this file and .def should only be added if MSVC (in CMakeLists.txt).
charls.rc and charls.def are needed when building a Windows DLL with the MSVC or the MingGW toolchain. With commit 9c25112 these files are only added to the charls target in the CMakeList.txt target when needed.
If WinGW is used to build the Windows DLL then these files should be used. The charls.def is only needed when building 32bit DLLs (see commit), it ensures that the functions are exported with the correct name. The file charls.rc ensures that the DLL has the correct version info. The Windows installer relies on versions numbers in DLLs to decide if a DLL needs to be replaced in a upgrade scenario.
I have changed the encoding of charls.rc from UTF16-LE to UTF8 in the past as Git doesn't handle UTF16 very well. I have never used windres.exe to compile the .rc file, but always used the Microsoft rc.exe compiler.
I will put MingGW as a compiler option on the backlog. You could try to convert charls.rc file to ASCII, UTF8 is preferred in general for .rc files, but as only a version info block is present, ASCII will probably work fine.