I am an experienced with MSVC and Code::Blocks on Linux. I'm trying to use C::B as my windows IDE too, but coming unstuck.
Heres my program, I should point out it compiles and runs if I remove the windows.h line:
-------------- Build: Debug in DX9Test3 ---------------
Compiling: main.cpp
In file included from C:/gamedev/PSDK/Include/windef.h:176,
from C:/gamedev/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/excpt.h:20,
from C:/gamedev/PSDK/Include/windows.h:157,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/winnt.h:666:2: #error Must define a target architecture.
In file included from C:/gamedev/PSDK/Include/rpc.h:142,
from C:/gamedev/PSDK/Include/windows.h:188,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/rpcnterr.h:4:1: warning: "/*" within comment
In file included from C:/gamedev/PSDK/Include/winscard.h:30,
from C:/gamedev/PSDK/Include/windows.h:198,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/wtypes.h:17: warning: ignoring #pragma warning
In file included from C:/gamedev/PSDK/Include/objbase.h:402,
from C:/gamedev/PSDK/Include/ole2.h:69,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/wtypes.h:17: warning: ignoring #pragma warning
In file included from C:/gamedev/PSDK/Include/objbase.h:403,
from C:/gamedev/PSDK/Include/ole2.h:69,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/unknwn.h:17: warning: ignoring #pragma warning
In file included from C:/gamedev/PSDK/Include/objbase.h:404,
from C:/gamedev/PSDK/Include/ole2.h:69,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/objidl.h:17: warning: ignoring #pragma warning
In file included from C:/gamedev/PSDK/Include/objbase.h:404,
from C:/gamedev/PSDK/Include/ole2.h:69,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/objidl.h:6545: warning: ignoring #pragma warning
C:/gamedev/PSDK/Include/objidl.h:6561: warning: ignoring #pragma warning
In file included from C:/gamedev/PSDK/Include/objbase.h:978,
from C:/gamedev/PSDK/Include/ole2.h:69,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/urlmon.h:17: warning: ignoring #pragma warning
In file included from C:/gamedev/PSDK/Include/msxml.h:274,
from C:/gamedev/PSDK/Include/urlmon.h:278,
from C:/gamedev/PSDK/Include/objbase.h:978,
from C:/gamedev/PSDK/Include/ole2.h:69,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/oaidl.h:442:1: pasting "/" and "/" does not give a valid preprocessing token
In file included from C:/gamedev/PSDK/Include/msxml.h:274,
from C:/gamedev/PSDK/Include/urlmon.h:278,
from C:/gamedev/PSDK/Include/objbase.h:978,
from C:/gamedev/PSDK/Include/ole2.h:69,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/oaidl.h:442: error: expected unqualified-id before '/' token
C:/gamedev/PSDK/Include/oaidl.h:457:1: pasting "/" and "/" does not give a valid preprocessing token
C:/gamedev/PSDK/Include/oaidl.h:457: error: expected unqualified-id before '/' token
In file included from C:/gamedev/PSDK/Include/objbase.h:978,
from C:/gamedev/PSDK/Include/ole2.h:69,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/urlmon.h:301: warning: ignoring #pragma comment
In file included from C:/gamedev/PSDK/Include/objbase.h:979,
from C:/gamedev/PSDK/Include/ole2.h:69,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/propidl.h:17: warning: ignoring #pragma warning
In file included from C:/gamedev/PSDK/Include/objbase.h:979,
from C:/gamedev/PSDK/Include/ole2.h:69,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/propidl.h:310:1: pasting "/" and "/" does not give a valid preprocessing token
In file included from C:/gamedev/PSDK/Include/objbase.h:979,
from C:/gamedev/PSDK/Include/ole2.h:69,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/propidl.h:310: error: expected unqualified-id before '/' token
C:/gamedev/PSDK/Include/propidl.h:1423: warning: ignoring #pragma warning
C:/gamedev/PSDK/Include/propidl.h:1424: warning: ignoring #pragma warning
In file included from C:/gamedev/PSDK/Include/oleauto.h:57,
from C:/gamedev/PSDK/Include/ole2.h:70,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/oaidl.h:17: warning: ignoring #pragma warning
In file included from C:/gamedev/PSDK/Include/ole2.h:134,
from C:/gamedev/PSDK/Include/windows.h:207,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/oleidl.h:17: warning: ignoring #pragma warning
In file included from C:/gamedev/PSDK/Include/windows.h:214,
from E:\_Dev\DX9Test3\main.cpp:4:
C:/gamedev/PSDK/Include/stralign.h: In function `WCHAR* ua_wcscpy(WCHAR*, const WCHAR*)':
C:/gamedev/PSDK/Include/stralign.h:99: warning: ignoring #pragma warning
C:/gamedev/PSDK/Include/stralign.h:100: warning: ignoring #pragma warning
C:/gamedev/PSDK/Include/stralign.h:102: warning: ignoring #pragma warning
Process terminated with status 1 (0 minutes, 2 seconds)
7 errors, 17 warnings
I've installed the PSDK, added the global variable, and set the paths for include and lib in search directories.