Cmake cross platform Execution Problems?
I've downloaded the opencv code from the github and executed the code using VisualStudio2012. There was no problem. I tested with some sample program execution, it works fine. With the same OpenCv code, i executed that in linux and also with some sample programs, it work's fine.
Now when i again build the same opencv code in the windows, the macros related to linux were checked on, windows related macros were checked out. Thus, resulting in the build failed.
I checked with the CMakeLists.txt, it shows UNIX, while executing in windows. How to get rid of this problem:?
your screenshot is somewhat useless here (as ppl can't quote you, it cannoot be searched, etc. try to come up with a text representation..
(and it also only shows that the text encoding (line endings and such) differs between the github and the SF version. nothing to worry about , here)
"the macros related to linux were checked on, windows related macros were checked out." -- that's not, what it shows above.
"Thus, resulting in the build failed. " -- you will need to explain better, what you did exactly, and what the resulting error msgs were.
i made certain changes in the opencv code and compiled in the linux, it works fine. When Cmake'ing the same code in windows and build using visual studio, the build failed, because of the linux macros were checked in, when running in windows. How to disable linux macros in windows?
which macros are you talking about ?
what did you change ?
Check here the macros will be defined as #ifdef CAP_VFW or CAP_V4L , etc.
Here, check with the cvCreateCameraCapture function(), TRY_OPEN(),.
(This is check in)