简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM