From: SF/projects/mingw n. l. <min...@li...> - 2012-10-19 16:51:28
|
Bugs item #3447223, was opened at 2011-12-01 08:18 Message generated for change (Settings changed) made by earnie You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3447223&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: w32api (deprecated use WSL) >Group: No User Response >Status: Closed Resolution: Invalid Priority: 5 Private: No Submitted By: splitfrog (splitfrog) Assigned to: Nobody/Anonymous (nobody) Summary: compiler not imports function from lib Initial Comment: A compiler not imports a function GetShellWindow(), that located in libuser32.a library (user32.dll) . Compiler writes message: main.cpp: In function 'int WinMain(HINSTANCE, HINSTANCE, LPSTR, int)': main.cpp:10:17: error: 'GetShellWindow' was not declared in this scope Tested on gcc ver. 4.4.0, 4.5.2, 4.6.1-2. Other functions from libuser32.a are imports fine. My info: GCC Version: Using built-in specs. COLLECT_GCC=C:\Program Files\MinGw_gcc.4.6.1-2\bin\gcc.EXE COLLECT_LTO_WRAPPER=c:/program files/mingw_gcc.4.6.1-2/bin/../libexec/gcc/mingw32/4.6.1/lto-wrapper.exe Target: mingw32 Configured with: ../gcc-4.6.1/configure --enable-languages=c,c++,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 -- enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --build= mingw32 --prefix=/mingw Thread model: win32 gcc version 4.6.1 (GCC) Binutils Version: GNU ld (GNU Binutils) 2.21.53.20110804 Environment: MS Windows 2003 Enterprise SP2 x86. (Also tested on Windows 7 x86) ---------------------------------------------------------------------- Comment By: Keith Marshall (keithmarshall) Date: 2012-01-01 08:10 Message: This is more likely to be your error, than a MinGW bug. I'm guessing, because I can't read your code example, (unsuitable archive format -- please use tar.gz or zip), that you haven't enabled the necessary level of WINVER support; see the notes in include/windef.h BTW, "foo not defined in this scope" doesn't mean the symbol wasn't imported from the DLL; it means that you either didn't include a necessary header, or you didn't enable appropriate support to expose a conditional declaration in a header you did include. The declaration of GetShellWindow() is provided conditionally when you include windows.h, but it will not be exposed if you neglect to define _WIN32_WINNT >= 0x0500 beforehand. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3447223&group_id=2435 |