Opencv Static build, jpeg,png,tiff not static linked?

你。 提交于 2019-12-11 03:28:36

问题


I build opencv 233 as a static lib, but when i use it in my application, it gives link errors when calling cv::imwrite() that tiff,png,jasp libs are not linked. Is this the intention that i should link these my self in my app or did i build it wronge.

I would like that the 3party libs are static included in the opencv_highgui.lib instead of having to link them myself in my apps.


回答1:


In the solution, if configured for visual studio 2010, the 3th party libs are not set to be linked in. Change the Link Library Dependencies to true for the highgui project.




回答2:


In cmake, make sure you have BUILD_3RDPARTY, or whatever it is called, checked. OpenCV will then build lib dependencies from its own tree and statically link into highgui. This is the default for Windows.



来源:https://stackoverflow.com/questions/9966109/opencv-static-build-jpeg-png-tiff-not-static-linked

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!