Ask Your Question

Build error when activating both cvv and world

asked 2019-03-15 08:34:04 -0500

lzlu123 gravatar image

Platform: Windows 10, VS2017, Qt 5.12.1, OpenCV (multiple version, master, 4.0.1, 3.4.5)

There is no build error when I activate openCV contrib and "WITH_QT" being ON. However, errors occur when I activate openCV contrib, Qt AND "BUILD_opencv_world". Build errors look like something as:

stfl_query_widget_lineedit.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl cvv::qtutil::STFLQueryWidgetCompleter::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@STFLQueryWidgetCompleter@qtutil@cvv@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)

which appears Qt moc error. If I disable the cvv module in contrib, the build will succeed, even though "BUILD_opencv_world" is still set to ON.

How can I change the build script so that both cvv and world modules can be built?

Thanks in advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-03-15 08:38:40 -0500

berak gravatar image

please disable the opencv_world module, when using ANY modules from opencv_contrib (there's a problem with circular dependancies there)

cmake -DBUILD_opencv_world=OFF

(then later, you'll have to link against "single" module libs, like -lopencv_core -lopencv_imgproc, etc.)

edit flag offensive delete link more


Looks like world module also has build issue when gapi module is activated in master branch. If I de-activate world module, all modules in both default and contrib are built fine. The two modules, cvv and gapi have issues with world module. Do you have any suggestion to fix the build? Why did you say there are circular dependencies? It looks like Qt's moc is not able to wrap some headers correctly, but I just guess and no idea what's happening.

Thanks a lot for your reply.

lzlu123 gravatar imagelzlu123 ( 2019-03-15 11:13:06 -0500 )edit

idk. about qt (not using it), above was more a general remark.

but the gapi issue seems to be new, -- interesting !

berak gravatar imageberak ( 2019-03-15 11:21:32 -0500 )edit

Question Tools

1 follower


Asked: 2019-03-15 08:34:04 -0500

Seen: 370 times

Last updated: Mar 15 '19