我正在尝试使用OPNET 14.5A模拟视频流网络。
我将OPNET设置为将Visual Studio 2012用作编译器,并且正在使用OpenCV 2.4.10。
运行OPNET仿真时,出现以下错误:
Creating library C:\opnet_projects\4nodes.project\4nodes-scenario1.dev32.i0.nt.lib and object C:\opnet_projects\4nodes.project\4nodes-scenario1.dev32.i0.nt.exp
wlan_mac_hcf.dev32.i0.pr.obj : error LNK2019: unresolved external symbol _cvReleaseImage referenced in function _wlan_hcf_completed_frame_forward
wlan_mac_hcf.dev32.i0.pr.obj : error LNK2019: unresolved external symbol _cvCreateMemStorage referenced in function _wlan_mac_hcf
wlan_mac_hcf.dev32.i0.pr.obj : error LNK2019: unresolved external symbol _cvClearMemStorage referenced in function _faceDetection
wlan_mac_hcf.dev32.i0.pr.obj : error LNK2019: unresolved external symbol _cvGetSeqElem referenced in function _faceDetection
wlan_mac_hcf.dev32.i0.pr.obj : error LNK2019: unresolved external symbol _cvLoad referenced in function _wlan_mac_hcf
wlan_mac_hcf.dev32.i0.pr.obj : error LNK2019: unresolved external symbol _cvHaarDetectObjects referenced in function _faceDetection
wlan_mac_hcf.dev32.i0.pr.obj : error LNK2019: unresolved external symbol _cvLoadImage referenced in function _wlan_hcf_completed_frame_forward
myRTPJPEGheader.dev32.i0.ex.obj : error LNK2019: unresolved external symbol _cvCreateImage referenced in function _convertToOPENCV
myRTPJPEGheader.dev32.i0.ex.obj : error LNK2019: unresolved external symbol _cvGet2D referenced in function _getPSNR
C:\opnet_projects\4nodes.project\4nodes-scenario1.dev32.i0.nt.dll : fatal error LNK1120: 9 unresolved externals
bind_so_msvc: Unable to execute Manifest control program "mt.exe" (Win32 error code: 2)
----
<<< Program Abort >>>
Error encountered rebuilding repository -- unable to proceed
T (0), EV (-), MOD (NONE), PROC (sim_load_repos_load)
----
我已经通过以下方式设置了Microsoft.Cpp.Win32.user.props文件:
- C/C++ -> General -> Additional Include Directories
C:\OpenCV2.4\opencv\build\include
C:\OpenCV2.4\opencv\build\include\opencv
C:\OpenCV2.4\opencv\build\include\opencv2
- Linker -> General -> Additional Library Directories
C:\OpenCV2.4\opencv\build\x86\vc11\lib
- Linker -> Input -> Additional Dependencies
opencv_calib3d2410d.lib
opencv_contrib2410d.lib
opencv_core2410d.lib
opencv_features2d2410d.lib
opencv_flann2410d.lib
opencv_gpu2410d.lib
opencv_highgui2410d.lib
opencv_imgproc2410d.lib
opencv_legacy2410d.lib
opencv_ml2410d.lib
opencv_nonfree2410d.lib
opencv_objdetect2410d.lib
opencv_ocl2410d.lib
opencv_photo2410d.lib
opencv_stitching2410d.lib
opencv_superres2410d.lib
opencv_ts2410d.lib
opencv_video2410d.lib
opencv_videostab2410d.lib
- Added the following to my Path System Variable
C:\OpenCV2.4\opencv\build\x86\vc11\bin;
请帮助我了解设置测试环境时我做错了什么。
最佳答案
我从另一个来源收到并回答了这个问题,这是供参考的答案。
关于c++ - LNK2019:OPNET 14.5A中 Unresolved external symbol 错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29068110/