Linker error when trying to use cv::circle

Hello,

I am running into an issue while trying to access a multitude of functions in OpenCV, including cv::circle. I built OpenCV (shared libs, no contrib modules, no IPP, with world) and added it to an Unreal Engine 5 project.

cv::Mat for example, works fine, however, for any other function, such as imshow, imwrite & circle, the linker throws up unresolved external errors related to these functions, and I’m not sure why.

From this brief description, can you glean anything into the issue? If any additional detail is necessary, I can provide it. Many thanks.

Using OpenCV 4.10.0 & UE 5.3.

Error:

LNK2019|unresolved external symbol void _cdecl cv::circle(class cv::InputOutputArray const &,class cv::Point,int,class cv::Scalar const &,int,int,int)

so, what do you link ?

I am loading the static and dynamic libraries in Unreal’s build.cs file. Since I’m using the world version:

PublicAdditionalLibraries.Add(Path.Combine(LibPath, “opencv_world4100d.lib”));
PublicDelayLoadDLLs.Add(Path.Combine(DLLPath, “opencv_world4100d.dll”));
RuntimeDependencies.Add(Path.Combine(DLLPath, “opencv_world4100d.dll”));

The result is the same if I build without world and add all libraries separately, so I guess I’m just doing something wrong.

Thanks!

try release, not debug libs

Yep, that was it. Works with release libs. Thank you!