facebookarchive / xcbuild

Xcode-compatible build tool.
Other
2k stars 190 forks source link

cmake compiler not set #305

Closed TONY-CONNECT closed 4 years ago

TONY-CONNECT commented 5 years ago

hi trying to install dlib but encounter this issue that cmake compiler not set. in attempt to fix i saw this:

C:\WINDOWS\system32>SET(CMAKE_C_COMPILER C:/MinGW/bin/gcc.exe) Environment variable (CMAKE_C_COMPILER C:/MinGW/bin/gcc.exe) not defined

i don't know how to go about it. thanks in anticipation for your help.

NaruFGT commented 4 years ago

@TONY-CONNECT It looks like you're trying to tell CMake where to find your C Compiler. You want to configure this with environmental variables. In Windows, you can use setx like: setx CC "C:\MinGW\bin\gcc.exe" Similarly with your C++ Compiler but with the CXX variable rather than CC, my guess is you will be using g++ ? If you do want to modify CMakeLists.txt that is where you would place SET(CMAKE_C_COMPILER ...) and SET(CMAKE_CXX_COMPILER ...)

sas commented 4 years ago

Yeah, what @NaruFGT said is correct. I'll close this issue as it is likely resolved.