How to get Direct X 8 in Dev-CPP
How to get Direct X 8 in Dev-CPP
The really easy and fast way:
First, in Dev-CPP, open Tools->Check for Updates/Packages and download the DirectX 9 Devpak (this contains what you need for DX8 as well).
Then, unzip the Irrlicht sources and open the Irrlicht.dev project file.
Go to Project->Project Options (ALT+P) and go to the parameters tab, and add this line:
-D_IRR_COMPILE_WITH_DIRECTX_8_=1
to Compiler and C++ compiler options, under -DIRRLICHT_EXPORTS=1 (maybe only C++ is needed, but it doesn't hurt). This tells Irrlicht to build the driver for Direct X 8.
Then, add this line to the linker options:
-ld3dx8d
This tells the linker to include the Direct X library into the DLL.
Then, go to the Directories tab, and change the library directories to:
jpeglib
zlib
- Those are local paths to the libs included in the source zip.
Change the include directory to simply:
include
- also the local path.
Now, all you should need to do is hit CTRL+F9 and go get some coffee while it builds. You will need to copy the d3dx8d.dll file to either the system dir or to the dir you are executing your programs in... I'm not sure if it is possible to build this statically, but this will have to do for now - at least we have DX support, as all the examples run just fine.
Now, doing this sadly means that you need the Direct X DLL no matter what driver you are building for - I was planning to include this DLL in the DevPak instead, but now I'm not so sure. Maybe I should just supply both or something, I'll have to think about it.
I couldn't get the same procedure to work for DirectX 9 no matter what I tried - it builds and links alright, but it looks for the wrong DLL (d3d9.dll I think) that I don't have. Anybody has any clues? I've only downloaded and used the DX9 DevPak, no other SDK:s or anything.
First, in Dev-CPP, open Tools->Check for Updates/Packages and download the DirectX 9 Devpak (this contains what you need for DX8 as well).
Then, unzip the Irrlicht sources and open the Irrlicht.dev project file.
Go to Project->Project Options (ALT+P) and go to the parameters tab, and add this line:
-D_IRR_COMPILE_WITH_DIRECTX_8_=1
to Compiler and C++ compiler options, under -DIRRLICHT_EXPORTS=1 (maybe only C++ is needed, but it doesn't hurt). This tells Irrlicht to build the driver for Direct X 8.
Then, add this line to the linker options:
-ld3dx8d
This tells the linker to include the Direct X library into the DLL.
Then, go to the Directories tab, and change the library directories to:
jpeglib
zlib
- Those are local paths to the libs included in the source zip.
Change the include directory to simply:
include
- also the local path.
Now, all you should need to do is hit CTRL+F9 and go get some coffee while it builds. You will need to copy the d3dx8d.dll file to either the system dir or to the dir you are executing your programs in... I'm not sure if it is possible to build this statically, but this will have to do for now - at least we have DX support, as all the examples run just fine.
Now, doing this sadly means that you need the Direct X DLL no matter what driver you are building for - I was planning to include this DLL in the DevPak instead, but now I'm not so sure. Maybe I should just supply both or something, I'll have to think about it.
I couldn't get the same procedure to work for DirectX 9 no matter what I tried - it builds and links alright, but it looks for the wrong DLL (d3d9.dll I think) that I don't have. Anybody has any clues? I've only downloaded and used the DX9 DevPak, no other SDK:s or anything.
Thanks stoffe but when i run my code with EDT_DIRECTX8 i get this message in the msdos window:
DirectX Driver was not compiled into this dll. Try OpenGL
Error: Could not load built-in Font.
I have installed directx9 DEVPACK.
I configre the project options.
I put the d3dx8d.dll into system32 folder and in the same folder of the project.
Any idea????
DirectX Driver was not compiled into this dll. Try OpenGL
Error: Could not load built-in Font.
I have installed directx9 DEVPACK.
I configre the project options.
I put the d3dx8d.dll into system32 folder and in the same folder of the project.
Any idea????
Problem with compilation
Thanks for the instructions - my machine doesn't like OpenGL much, so DirectX would be great.
But, although dev-cpp claims to have compiled - 'Compilation successful,' but no dll is made, and looking at the compile log,
'C:\PROGRA~1\DEV-CPP\BIN\DLLWRAP.EXE: Must provide at least one of -o or --dllname options'
This seems to be despite -o IRRLICHT.dll being on the linker command:
Yours
James Packer
But, although dev-cpp claims to have compiled - 'Compilation successful,' but no dll is made, and looking at the compile log,
'C:\PROGRA~1\DEV-CPP\BIN\DLLWRAP.EXE: Must provide at least one of -o or --dllname options'
This seems to be despite -o IRRLICHT.dll being on the linker command:
Any suggestions as to what is going on, and how to fix it. Alternatively, is there a dll for dev-cpp with DirectX 8 already compiled in?Compiler: Default compiler
Building Makefile: "C:\IRRLIC~1.6\SOURCE\SOURCE\Makefile.win"
Executing make...
make.exe -f "C:\IRRLIC~1.6\SOURCE\SOURCE\Makefile.win" all
dllwrap.exe --output-def libIRRLICHT.def --driver-name c++ --implib libIRRLICHT.a CAnimatedMeshMD2.o CAnimatedMeshMS3D.o CAnimatedMeshSceneNode.o CBillboardSceneNode.o CBspTree.o CBspTreeSceneNode.o CCameraMayaSceneNode.o CCameraSceneNode.o CColorConverter.o CDirectX8Texture.o CFileList.o CFileSystem.o CFPSCounter.o CGUIButton.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIListBox.o CGUIMeshViewer.o CGUIScrollBar.o CGUISkin.o CGUIStaticText.o CGUIWindow.o CIrrDeviceWin32.o CLightSceneNode.o CLimitReadFile.o CMemoryReadFile.o CMeshSceneNode.o COctTreeSceneNode.o COpenGLTexture.o CQ3LevelMesh.o CReadFile.o CSceneManager.o CSceneNodeAnimatorFlyCircle.o CSceneNodeAnimatorRotation.o CSoftwareTexture.o CStaticMeshOBJ.o CTestSceneNode.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudWire.o CVideoDirectX8.o CVideoNull.o CVideoOpenGL.o CVideoSoftware.o CZBuffer.o CZipReader.o Irrlicht.o os.o CCameraFPSSceneNode.o CGeometryCreator.o CSceneNodeAnimatorFlyStraight.o CSceneNodeAnimatorTexture.o CDefaultMeshFormatLoader.o CSkyBoxSceneNode.o CShadowVolumeSceneNode.o C3DSMeshFileLoader.o CSceneCollisionManager.o CIrrDeviceStub.o CParticleSystemSceneNode.o CParticleFadeOutAffector.o CParticleBoxEmitter.o CParticlePointEmitter.o CParticleGravityAffector.o CDummyTransformationSceneNode.o CGUIInOutFader.o CIrrDeviceLinux.o CMeshManipulator.o CMetaTriangleSelector.o COctTreeTriangleSelector.o CSceneNodeAnimatorCollisionResponse.o CSceneNodeAnimatorDelete.o CTriangleBBSelector.o CTriangleSelector.o CVideoModeList.o CWaterSurfaceSceneNode.o CGUIMessageBox.o CGUIModalScreen.o CEmptySceneNode.o CImage.o CImageLoaderBmp.o CImageLoaderJPG.o CImageLoaderPCX.o CImageLoaderPSD.o CImageLoaderTGA.o CLogger.o CTerrainSceneNode.o CDirectX9Texture.o CGUIContextMenu.o CGUIEditBox.o CGUIMenu.o CGUITabControl.o COSOperator.o CSceneNodeAnimatorFollowSpline.o CVideoDirectX9.o CXAnimationPlayer.o CXFileReader.o CXMeshFileLoader.o CTextReader.o CXMLReader.o CWriteFile.o CGUIComboBox.o CGUIToolBar.o CXMLWriter.o CGUICheckBox.o IRRLICHT_private.res -L"C:/PROGRAM FILES/DEV-CPP/lib" -L"C:/irrlicht-0.6/source/source/jpeglib" -L"C:/irrlicht-0.6/source/source/zlib" --no-export-all-symbols --add-stdcall-alias -lgdi32 -lglu32 -lopengl32 -ljpeg -lz -ld3dx8d -o IRRLICHT.dll
Yours
James Packer
First I'd like to thank stoffe for the instructions. It has been driving me nuts trying to find of a way to use directx under dev c++.
I do have a question that someone may possibly be able to help on. I'm trying to get directx9 to work with dev c++. I've got the devpack for dx9 and I've also tried by creating my own libs with the sdk files but for some reason irrlicht can't create the mip map levels from anything I compile from here so I was just wondering if anyone knew how to resolve this problem or know of a way to link directx9 using something like these instructions that stoffe posted? I tried do it with these instruction and directx9 will work with out causing those file needs to shut down errors but none of the mip map levels are being created.
I do have a question that someone may possibly be able to help on. I'm trying to get directx9 to work with dev c++. I've got the devpack for dx9 and I've also tried by creating my own libs with the sdk files but for some reason irrlicht can't create the mip map levels from anything I compile from here so I was just wondering if anyone knew how to resolve this problem or know of a way to link directx9 using something like these instructions that stoffe posted? I tried do it with these instruction and directx9 will work with out causing those file needs to shut down errors but none of the mip map levels are being created.
Hi!
Thanks for the nice tut!
I followed all steps but when compiling I get the following error:
\DevCpp\Bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe F:\Programming\irrlicht-0.6\source\D
cannot find -ljpeg
I hope this isn´t sounding to stupid, I´m just starting with Dev-C++ and I don´t have a clue what all the linker options do ... any help with this is really appreciated!
Cheers!
Thanks for the nice tut!
I followed all steps but when compiling I get the following error:
\DevCpp\Bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe F:\Programming\irrlicht-0.6\source\D
cannot find -ljpeg
I hope this isn´t sounding to stupid, I´m just starting with Dev-C++ and I don´t have a clue what all the linker options do ... any help with this is really appreciated!
Cheers!
Thanks very much Stoffe. I've got DirectX support for my Irrlicht projects compiled with Dev-cpp
by the way, the d3d9 dll is included in the Devpack (at least what I downloaded.) However, Using DirectX 9 in the Techdemo compiled with Dev-cpp and using a dll modified to support DirectX9 thru d3d9.dd gave me rather fuzzy rendering. OpenGl and DirectX 8 gave much better results
by the way, the d3d9 dll is included in the Devpack (at least what I downloaded.) However, Using DirectX 9 in the Techdemo compiled with Dev-cpp and using a dll modified to support DirectX9 thru d3d9.dd gave me rather fuzzy rendering. OpenGl and DirectX 8 gave much better results
Thanks very much Stoffe. I've got DirectX support for my Irrlicht projects compiled with Dev-cpp
by the way, the d3d9 dll is included in the Devpack (at least what I downloaded.) However, Using DirectX 9 in the Techdemo compiled with Dev-cpp and using a dll modified to support DirectX9 thru d3d9.dd gave me rather fuzzy rendering. OpenGl and DirectX 8 gave much better results
by the way, the d3d9 dll is included in the Devpack (at least what I downloaded.) However, Using DirectX 9 in the Techdemo compiled with Dev-cpp and using a dll modified to support DirectX9 thru d3d9.dd gave me rather fuzzy rendering. OpenGl and DirectX 8 gave much better results
Thanks very much Stoffe. I've got DirectX support for my Irrlicht projects compiled with Dev-cpp
by the way, the d3d9 dll is included in the Devpack (at least what I downloaded.) However, Using DirectX 9 in the Techdemo compiled with Dev-cpp and using a dll modified to support DirectX9 thru d3d9.dd gave me rather fuzzy rendering. OpenGl and DirectX 8 gave much better results
by the way, the d3d9 dll is included in the Devpack (at least what I downloaded.) However, Using DirectX 9 in the Techdemo compiled with Dev-cpp and using a dll modified to support DirectX9 thru d3d9.dd gave me rather fuzzy rendering. OpenGl and DirectX 8 gave much better results