Repository: opencv
Issue: OpenCV 2.4.9 highgui multiple definitions of functions
Labels: bug,auto-transferred,priority: normal,category: highgui-gui,affected: 2.4

Transferred from http://code.opencv.org/issues/3704

```
|| Michele Adduci on 2014-05-22 13:11
|| Priority: Normal
|| Affected: 2.4.9 (latest release)
|| Category: highgui-gui
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Windows
```
## OpenCV 2.4.9 highgui multiple definitions of functions

```
Hi

i'm trying to compile OpenCV 2.4.9 (downloaded from website) 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. How can it be solved?
```
## History
##### Michele Adduci on 2014-05-24 12:07

```
-   Assignee set to Anatoly Baksheev
```
##### Dmitry Retinskiy on 2014-05-29 05:14

```
Roman, could you check this problem?
Thanks.
-   Target version deleted (2.4.10)
-   Priority changed from High to Normal
-   Assignee changed from Anatoly Baksheev to Roman Donchenko
-   Status changed from New to Open
```