OpenCV 2.4.9 highgui isn't generated

asked 2014-05-22 07:58:07 -0600

blackibiza gravatar image

updated 2014-05-22 08:01:00 -0600

Hi

i'm trying to compile OpenCV 2.4.9 on a Windows 8.1 machine (x64) using CUDA 6.0 and OPENGL as enabled flags, under Visual Studio 2012. Everything goes fine except the generation of highgui.dll file, because i get the following error:

error LNK2005: cvCreateTrackbar already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

error LNK2005: cvCreateTrackbar2 already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

error LNK2005: cvDestroyAllWindows already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

error LNK2005: cvDestroyWindow already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 5 error LNK2005: cvGetTrackbarPos already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 6 error LNK2005: cvGetWindowHandle already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 7 error LNK2005: cvGetWindowName already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 8 error LNK2005: cvInitSystem already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 9 error LNK2005: cvMoveWindow already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 10 error LNK2005: cvNamedWindow already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 11 error LNK2005: cvResizeWindow already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 12 error LNK2005: cvSetMouseCallback already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 13 error LNK2005: cvSetTrackbarPos already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 14 error LNK2005: cvShowImage already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 15 error LNK2005: cvStartWindowThread already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 16 error LNK2005: cvWaitKey already defined in window.obj C:\Frameworks\OpenCV\build\modules\highgui\window_w32.obj opencv_highgui

Error 17 error LNK1169: one or more multiply defined symbols found C:\Frameworks\OpenCV\build\bin\Release\opencv_highgui249.dll 1 1 opencv_highgui

looking in the code, windows.cpp and windows_w32.cpp have the same definitions of same functions. Is that a bug? How can i fix it?

edit retag flag offensive close merge delete

Comments

yea. weird. if WITH_WIN32UI was set in cmake, it should have used windows_w32.cpp instead of window.cpp (without the 's' , btw) using both is clearly wrong

could you add the cmake output above ?

berak gravatar imageberak ( 2014-05-22 08:12:33 -0600 )edit

sure, here you find it http://pastebin.com/z1ynZJZN

GUI: QT: NO Win32 UI: YES OpenGL support: YES (glu32 opengl32) VTK support: NO

blackibiza gravatar imageblackibiza ( 2014-05-24 07:12:59 -0600 )edit