Use CLion with MinGW-w64 on MacOS High Sierra

Answered

I'm trying to get CLion to work on MacOS High Sierra using MinGW-w64. The main purpose of this is to attempt to cross compile software for Windows on MacOS, however, CLion is not detecting the installed MinGW-w64. The MinGW-w64 was installed using homebrew. 

Just curious if anyone got this working or if I am missing something obvious. 

0
2 comments

Hi!

For cross-compiling, you don't need MinGW as a host toolchain for CLion, you just need to set up the cross-compiler (it's usually done via providing the CMake toolchain file with the required variables, e.g. path to the compiler, target system name, etc). Unfortunately, there is nothing in CLion to assist with this process, however, once you've set it up with CMake, it should work fine. Please take a look at Make documentation: https://cmake.org/Wiki/CMake_Cross_Compiling.

0
Avatar
Permanently deleted user

Thank you very much, this totally solved my issue. I was able to cross compile using CLion on OSX for Windows without any issues.

0

Please sign in to leave a comment.