Code: Select all
createDevice(EDT_DIRECTX9, dimension2d<s32>(640, 480), 16,
false, false, false, 0);
Code: Select all
In function `int main(int, char**)':
error: `EDT_DIRECTX9' undeclared (first use this function)
So, I figured that was because I wasn't compiling irrlicht with directx9 support. So, I loaded up the codeblocks project to compile irrlicht and made the following changes:
In Linker Settings -> Link Libraries:
added d3d9.lib
In Search Directories -> Compiler:
added C:\CODE\libraries\DXSDK\Include
added C:\CODE\libraries\Microsoft Platform SDK for Windows XP SP2\Include
In Search Directories -> Linker:
added C:\CODE\libraries\DXSDK\Lib
added C:\CODE\libraries\Microsoft Platform SDK for Windows XP SP2\Lib
in Compiler Settings -> #defines:
added -DIRR_COMPILE_WITH_DX9_DEV_PACK
in IrrCompileConfig.h:
commented out #define _IRR_COMPILE_WITH_DIRECT3D_8_
Then, I hit "build", and it went on its merry way. Until...
Code: Select all
:: === Irrlicht, default ===
C:\CODE\libraries\Microsoft Platform SDK for Windows XP SP2\Include\winnt.h:214: warning: "_cdecl" redefined
:83:1: warning: this is the location of the previous definition
C:\CODE\libraries\Microsoft Platform SDK for Windows XP SP2\Include\winnt.h:741: #error Must define a target architecture.
C:\CODE\libraries\Microsoft Platform SDK for Windows XP SP2\Include\oaidl.h:441: pasting "/" and "/" does not give a valid preprocessing token
C:\CODE\libraries\Microsoft Platform SDK for Windows XP SP2\Include\oaidl.h:441: error: expected unqualified-id before '/' token
C:\CODE\libraries\Microsoft Platform SDK for Windows XP SP2\Include\oaidl.h:456: pasting "/" and "/" does not give a valid preprocessing token
C:\CODE\libraries\Microsoft Platform SDK for Windows XP SP2\Include\oaidl.h:456: error: expected unqualified-id before '/' token
C:\CODE\libraries\Microsoft Platform SDK for Windows XP SP2\Include\propidl.h:309: pasting "/" and "/" does not give a valid preprocessing token
C:\CODE\libraries\Microsoft Platform SDK for Windows XP SP2\Include\propidl.h:309: error: expected unqualified-id before '/' token
C:\CODE\libraries\irrlicht-1.3.1\source\Irrlicht\CD3D9Driver.cpp:: In member function `virtual bool irr::video::CD3D9Driver::beginScene(bool, bool, irr::video::SColor)':
C:\CODE\libraries\irrlicht-1.3.1\source\Irrlicht\CD3D9Driver.cpp:467: error: expected primary-expression before ',' token
C:\CODE\libraries\irrlicht-1.3.1\source\Irrlicht\CD3D9Driver.cpp:: In member function `virtual bool irr::video::CD3D9Driver::endScene(irr::s32, irr::core::rect<irr::s32>*)':
C:\CODE\libraries\irrlicht-1.3.1\source\Irrlicht\CD3D9Driver.cpp:509: error: expected primary-expression before ',' token
C:\CODE\libraries\irrlicht-1.3.1\source\Irrlicht\CD3D9Driver.cpp:509: error: expected primary-expression before ')' token
C:\CODE\libraries\irrlicht-1.3.1\source\Irrlicht\CD3D9Driver.cpp:: In member function `virtual bool irr::video::CD3D9Driver::setRenderTarget(irr::video::ITexture*, bool, bool, irr::video::SColor)':
C:\CODE\libraries\irrlicht-1.3.1\source\Irrlicht\CD3D9Driver.cpp:758: error: expected primary-expression before ',' token
C:\CODE\libraries\irrlicht-1.3.1\source\Irrlicht\CD3D9Driver.cpp:: In member function `virtual void irr::video::CD3D9Driver::drawStencilShadow(bool, irr::video::SColor, irr::video::SColor, irr::video::SColor, irr::video::SColor)':
C:\CODE\libraries\irrlicht-1.3.1\source\Irrlicht\CD3D9Driver.cpp:1825: error: expected primary-expression before ',' token
C:\CODE\libraries\irrlicht-1.3.1\source\Irrlicht\CD3D9Driver.cpp:: In member function `virtual void irr::video::CD3D9Driver::clearZBuffer()':
C:\CODE\libraries\irrlicht-1.3.1\source\Irrlicht\CD3D9Driver.cpp:2067: error: expected primary-expression before ',' token
:: === Build finished: 13 errors, 2 warnings ===
So. What have I done wrong? Is the Microsoft SDK just not compatible with GCC or what? Please feel free to go into as much detail as possible. I want to know not only what I did wrong but WHY it's wrong.