Re: [CMake] How to Compile with -municode for MinGW-w64

2018-05-30 Thread Petr Kmoch
Hi R0b0t1, add_definitions() is for adding preprocessor macro definitions (-D options), not for general compilation options such as -m. You should set the options as compilation options instead, using target_compile_options. Also, -mwindows should probably not be passed directly; instead, use

[CMake] How to Compile with -municode for MinGW-w64

2018-05-29 Thread R0b0t1
Hello, I pass -municode in add_definitions but GCC still complains about the wrong type on WinMain, citing it needs an LPSTR argument. With -municode set it should require a LPWSTR and should be named wWinMain. If I name the function wWinMain the linker complains about a missing WinMain, which