Using OpenCV-2.1.0 with MS Visual C++ 2010 on Windows 7

ที่มา: Using OpenCV-2.1.0 with MS Visual C++ 2010 on Windows 7

 

หลังจากติดตั้งเสร็จ พอรัน helloworld เจอ error ดังนี้

The application was unable to start correctly (0*0150002). Click Ok to close the application.

วิธีแก้

ไปที่ Project -> Proporties -> Linker-> Input -> Additional Dependencies

จากนั้นเปลี่ยนจาก cv210d.lib; cvaux210d.lib; cxcore210d.lib; highgui210d.lib; ml210d.lib;

เป็น cv210.lib; cvaux210.lib; cxcore210.lib; highgui210.lib; ml210.lib; opencv_ffmpeg210.lib;

ก็จะไม่ error อีก

 

นอกจาก error แล้ว ยังมีคำเตือนคำเตือนเหล่านี้อีก

‘C:\Windows\SysWOW64\ntdll.dll’, Cannot find or open the PDB file
‘C:\Windows\SysWOW64\kernel32.dll’, Cannot find or open the PDB file
‘C:\Windows\SysWOW64\kernellbase.dll’, Cannot find or open the PDB file

วิธีแก้

Go to Tools->Options->Debugging->Symbols and select checkbox “Microsoft Symbol Servers”

http://stackoverflow.com/questions/4813975/why-is-visual-studio-2010-not-able-to-find-open-pdb-files

แต่หลังจากแก้ไข้แล้ว เจอ คำเตือนอันใหม่ดังนี้

‘OpenCV_helloworld.exe’: Loaded ‘C:\OpenCV2.2\bin\opencv_imgproc220d.dll’, Cannot find or open the PDB file
‘OpenCV_helloworld.exe’: Loaded ‘C:\WINDOWS\system32\imm32.dll’, Symbols loaded (source information stripped).

ยังไม่รู้ว่าแก้ยังไง