2
votes

I have a big problem with building a simple program. I am using many tutorials, instructions and I can't solve it. I edit the variable's path as follows:

C/C++->General->Additionals Include Directories->MyOpenCv\build\include Linker->General->Additionals Library Directories->MyOpenCv\build\x86\vc11\lib Linker->Input->Additional Dependencies->*I added .libs

The same in Debug and Release.

Windows 8 x64, VS2012 x32, OpenCV 2.4.5

2
Are you using a Custom Build Step by any chance? Better yet, can you publish your .vcxprojmalenkiy_scot

2 Answers

0
votes

Go to C/C++ -> Output Files and check Object File Name. Chances are it contains a bogus macro reference.

0
votes

For C/C++, I have found for Visual Studio the location listed below is NOT the correct way to reference library files during linking the compiler-linking stage (at least in Community Version 2017). I had a project folder called 'lib' which contained all my .lib files. Originally I had specified a value like

Linker --> General --> Additional Library Directories: $(ProjectDir)lib;%(AdditionalDependencies)

I was getting error messages like:

error LNK1104: cannot open file 'lib.obj'

I figured out this was the correct way to specify the library directories:

VC++ Directories --> Library Directories

In my case, my value was:

VC++ Directories --> Library Directories: $(ProjectDir)lib;$(LibraryPath)