Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I want to build the bayes optimization program error is

The C compiler identification is GNU 4.9.2
The CXX compiler identification is GNU 4.9.2
Check for working C compiler: C:/MinGW/bin/gcc.exe
CMake Error: Generator: execution of make failed. Make command was: "C:MinGWin" "cmTryCompileExec2576605559/fast"
Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.2/Modules/CMakeTestCCompiler.cmake:61 (message):

The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Code-Lite-Test/CMakeFiles/CMakeTmp
Run Build Command:"C:MinGWin" "cmTryCompileExec2576605559/fast"
Access is denied
Generator: execution of make failed.  Make command was: "C:MinGWin"
"cmTryCompileExec2576605559/fast"
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):

I have downloaded source from url https://bitbucket.org/rmcantin/bayesopt/ and i have downloaded the MinGW compiler for Windows when I try to build the program the error is:

Please help me on this I have also deleted the old cache when I try to build the bayes optimization.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
186 views
Welcome To Ask or Share your Answers For Others

1 Answer

You could try to compile a simple C++ program first without CMake. E.g. store a simple main.cpp somewhere in your user directory C:Users<yourname>Temp directory with following content:

int main() 
{
   return 0;
}

Now open CMD window in your C:Users<yourname>Temp directory and run:

C:MinGWingcc.exe main.cpp -o testprog

If an error popup appears that is saying something about a missing .dll, run following command in your CMD window and try to compile again:

set PATH=%PATH%;C:MinGWin

If you had to run the last command, add the C:MinGWin path permanently. After all it should be possible to run CMake with MinGW as compiler.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...