Ask Your Question

Carand's profile - activity

2016-01-30 11:11:15 -0500 received badge  Self-Learner (source)
2016-01-30 11:11:11 -0500 received badge  Student (source)
2013-11-08 05:15:39 -0500 answered a question Build on windows fails with "/" but works with "\" for /FI compiler option

I found out how to work around this problem. The problem is that MS VC is usually able to cope with "/" but it seems to require an absolute path, i.e. a drive letter. One approach would be to somehow get CMAKE to use an absolute path when CMAKE_CURRENT_SOURCE_DIR is used, but I had not sufficient time to find a way to do this. Therefore, I reverted to the ugly hack of modifying the file

[..]\opencv-master\cmake\OpenCVModule.cmake

by changing line

ocv_add_precompiled_header_to_target(${the_target} "${CMAKE_CURRENT_SOURCE_DIR}/${pch_path}precomp.hpp")

to

ocv_add_precompiled_header_to_target(${the_target} "C:/${CMAKE_CURRENT_SOURCE_DIR}/${pch_path}precomp.hpp")

Not nice, but it works.

Cheers, Andreas

2013-11-07 03:30:39 -0500 commented question Build on windows fails with "/" but works with "\" for /FI compiler option

I have found a work around that I will post tomorrow as the forum does not allow me to answer my own question within 1 day.

2013-11-06 03:46:43 -0500 asked a question Build on windows fails with "/" but works with "\" for /FI compiler option

Hello, I tried to build the most recent version of OpenCV under Windows using Visual Studio 10. Building of core fails with this message: cl : Command line error D8004: '/FI' requires an argument

If I replace the "/" (slash) to "\" (backslash) for the precompiled header file, the build works.

Is this known? How can I work around it?

Regards, Andreas