简体   繁体   中英

Debugging Settings for openCV project on VisualStudio 2013 [x64 machine]

My computer is x64bit so when setting the libraries and headers i would pass through opencv/build/x64/.. directory

it would say there are build errors and output the following in the terminal

Error 1 error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' C:\\Users\\koda\\Desktop\\FacialDetection\\ConsoleApplication2\\ConsoleApplication2\\opencv_highgui2410.lib(opencv_highgui2410.dll) ConsoleApplication2

i so changed all of the settings to opencv/build/x86/.. and didn't get errors in the code

trying to debug, a window appears saying that it's impossible to start the program because "opencv_highgui2410.dll" is missing in th computer. i assured that i was importing this file when importing the .lib files imported in both PropertySheet_Release and _Debug > Linker>Input

in the IDE's terminal the output i get these error messages 'ConsoleApplication2.exe' (Win32): Loaded 'C:\\Windows\\SysWOW64\\ntdll.dll'. Cannot find or open the PDB file. 'ConsoleApplication2.exe' (Win32): Loaded 'C:\\Windows\\SysWOW64\\kernel32.dll'. Cannot find or open the PDB file. 'ConsoleApplication2.exe' (Win32): Loaded 'C:\\Windows\\SysWOW64\\KernelBase.dll'. Cannot find or open the PDB file. The program '[7084] ConsoleApplication2.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.

but checking in the directory i find those files..

what should i do to get the code working?

thank you in advance for the help :)

You need to copy "opencv_highgui2410 d .dll" from opencv\\build\\x86\\vc12\\bin to your Debug folder and "opencv_highgui2410.dll" to your Release folder (where the executables are located).

You might need to do it as well with "opencv_core2410.dll" and "opencv_imgproc2410.dll".

By the way, you can cannot import a DLL from the linker, that's the main goal of a DLL (being 'dynamic', compared to static LIBs).

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