Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
554 views
in Technique[技术] by (71.8m points)

c - Can't build a Makefile with CMAKE, compiler is not specified

i'm trying to use OpenCV for Java Desktop(Available since 02/15/2013) to do a simple face recognition project(for study purposes), and i'm having a problem to build the OpenCV in Windows.

I'm following this tutorial , and i got stuck in the build part, where you need to generate a Makefile.

I executed the command below(as the tutorial says):

cmake -DBUILD_SHARED_LIBS=OFF

and got the following error:

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags:

The output was:
O sistema n?o pode encontrar o arquivo especificado(System couldn't find the specified file).

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: cl 
Build flags: 
Id flags: -c 

The output was:
O sistema n?o pode encontrar o arquivo especificado(System couldn't find the specified file) 

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: 

The output was:
O sistema n?o pode encontrar o arquivo especificado(System couldn't find the specified file).

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -c

The output was:
O sistema n?o pode encontrar o arquivo especificado(System couldn't find the specified file).

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: cl 
Build flags: 
Id flags: -Aa

The output was:
O sistema n?o pode encontrar o arquivo especificado(System couldn't find the specified file).

Determining if the CXX compiler works failed with the following output:

I'm a newbie in C, but i think it might be a problem with my compiler, i have MinGW installed, but i don't know how to specify to CMake where he is.

I also tried to run the CMake GUI, but it returned the same error.

Thanks in advance.

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

You do not need to specify to CMake where the MinGW is, since it is in PATH environment variable. If you want to install OpenCV 2.4.4 with support for Java Desktop, you do not need to compile all source, just download executable from here (also specified in tutorial that you mentioned) and extract it to the directory where you want to install it. And that is it.

Compiling Opencv for Java was necessary in previous version, when it was experimental.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...