1

I'll start by saying that I don't have much experience at all with compiled languages, this may be obvious but I've done a few solid hours searching and have come up empty-handed.

I am trying to build this project in Eclipse. I have built and imported OpenCV 3.1, and everything seems okay until I go to build the project. At that point I get a wide array of error messages saying that I have 'undefined references'.

For example:

C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL15icvRemoveWindowP8CvWindow+0x11b): undefined reference to `SelectObject@8'
C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL15icvRemoveWindowP8CvWindow+0x126): undefined reference to `DeleteObject@4'
C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL15icvRemoveWindowP8CvWindow+0x138): undefined reference to `DeleteDC@4'
C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL16icvGetBitmapDataP8CvWindowP7tagSIZEPiPPv.isra.0+0x1e): undefined reference to `GdiFlush@0'
C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL16icvGetBitmapDataP8CvWindowP7tagSIZEPiPPv.isra.0+0x32): undefined reference to `GetCurrentObject@8'
C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL16icvGetBitmapDataP8CvWindowP7tagSIZEPiPPv.isra.0+0x6d): undefined reference to `GetObjectA@12'

Full console output is here.

From what I've seen, the causes of this error in general can be varied, perhaps the specifics of my case would allow a more precise answer.

I get the feeling that I'm not importing something correctly, or not setting an appropriate flag, but I have no idea what it is, or how to accomplish it. Any help would be greatly appreciated.

Matt

Matt
  • 518
  • 2
  • 5
  • 19
  • Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Richard Critten Jul 27 '16 at 07:04
  • From what I've seen, the causes of this error in general can be varied, perhaps the specifics of my case would allow a more precise answer. – Matt Jul 28 '16 at 01:03
  • 1
    All your missing functions are in Gdi32.lib Search "msdn SelectObject" (for example) - scroll down to requirements add missing libraries to project. – Richard Critten Jul 28 '16 at 10:45

1 Answers1

1

All your missing functions are in Gdi32.lib Search "msdn SelectObject" (for example) - scroll down to requirements add missing libraries to project

-- comment by Richard Critten

n611x007
  • 8,952
  • 8
  • 59
  • 102