From: Mark J. S. <mar...@ya...> - 2012-06-12 00:05:26
|
In his excellent tutorial on windows and win32 APIs (found at: http://mirrors.zoreil.com/webclub.kcom.ne.jp/ma/colinp/win32/test.txt), the author is using the win32api: GetCurrentObject. Needing to alter the program slightly for windows Eclipse/GCC/MinGW, I #included the wingdi.h in the program at the top. In this file, found at my D:\UtilUso\EclipseMinGW\include\ path, a reference is found for said API: GetCurrentObject. I use the following Set Windows Version code: #ifdef _MSDEV_WINDOWS #define _WIN32_WINNT 0x0601 #endif The GCC compiler has no problem in locating wingdi.h. The header file seems to contain the right info, but when I compile, the following error message appears: undefined reference to `GetCurrentObject@8' --------------------------------------------------------- My C:\windows\System32 directory has the gdi32.dll 11/20/2010 08:19 AM, 304,640 bytes, and the: gdiplus.dll 01/30/2010 02:13 AM, 1,645,320 bytes files contained in it (I think these are the right ones). -------- What am I doing wrong? I am running Eclipse with default compiler options. Is there an option that needs to be added to the list? -------------------------------------------------------------------------- Using Eclipse for Windows C++ CDT: C/C++ Development Tools and C/C++ Development Tools SDK Both are version: 8.0.2.201202111925 and MINGW from mingw-get-inst-20111118. |