Path for CC on windows
I'm trying to set up a project on windows, but am having trouble with cmake finding CC/CXX. I have them installed in c:\cywin\bin. I can verify that I can run them with either c:\cygwin\gcc or c:/cygwin/gcc (same for g++).
When I try to run with clion, I get a message that "c:/cygwin/gcc is not a full path to an existing compiler tool."
I put gcc on the path & then I get a message that cmake can't find gcc in the clion build dir (true, but not helpful). I tried setting the environmental variable to the full path, which also doesn't work.
Given where gcc is installed, what should I put in for the path to the compiler? FWIW, I also installed gdb & make (& cmake) for cygwin.
I've been building this project on the mac & am just bringing it to windows, fwiw.
Thanks, Beth
Please sign in to leave a comment.
I did manage to get to the point where I can compile, with mingw gcc. I took out pretty much everything that specifies a compiler, including some text in my cmake file (that said
#set (CC cc CACHE STRING "C Compiler short name")
#find_program (CMAKE_C_COMPILER "${CC}" DOC "C Compiler")
#
#set (CXX c++ CACHE STRING "C++ Compiler short name")
#find_program (CMAKE_CXX_COMPILER "${CXX}" DOC "C++ Compiler")
)
and apparently, I'm now getting the default, which is mingw gcc. It also turns out
that it is best to use mingw (for the project), so I guess this is ok. Still curious though ...
Thanks, Beth
Hi, Beth.
Providing a path to the cygwin installation via `File | Settings | Build, Execution, Deployment | Toolchains` should be enough, do you have the correct path there?