I installed MinGW and Eclipse with CDT for development in C ++ on Windows. Everything works fine as long as I do #include <windows.h>. As soon as I do this, I get a linker error message c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: final link failed: Invalid argumentin which the path at the beginning resolves C:/MinGW/mingw32/bin/ld.exe.
#include <windows.h>
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: final link failed: Invalid argument
C:/MinGW/mingw32/bin/ld.exe
I have no idea what the error message is trying to tell me ... so please help me decrypt it.
Since I actually disagree with Lol4t0 that this is too localized, here is an ugly answer: reinstalling g ++ solved the problem.
, , , , , ( ) ... , (2005). .
, .
, -lgdi32 -lkernel32 -luser32, WinAPI, <windows.h>
-lgdi32 -lkernel32 -luser32
<windows.h>
Eclipse, (gdi32, kernel32, user32) :
Project Proprertsies → C/++ build → → GCC Linker → → " "
( eclipse cdt)