video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
im using Dev-C++ and it says 'video' has not been declared ??
is ther something i need ??
My installs
Dev-C++ "devcpp-4.9.9.2_nomingw_setup.exe"
Irrlicht "irrlicht-1.6.zip"
The "Project options" (setting the dir) i used the Tutorial on the web page...
Microsoft Windows XP Professional
5.1.2600 Service Pack 3 Build 2600
X86-based PC
x86 Family 15 Model 6 Stepping 4 GenuineIntel ~3400
Hardware Abstraction Layer
Version = "5.1.2600.5508 xpsp.080320-1628
DirectX 9.0c (4.0.9.0000.0904)
NIVIDIA GeForce 8800GT Driver version 6.14.0011.7824
Also i have .net framework up to 3.5
Any idee whats wrong?
-
bluebunny76
- Posts: 4
- Joined: Wed Oct 28, 2009 11:53 pm
Any idee whats wrong?
Last edited by bluebunny76 on Thu Oct 29, 2009 7:08 am, edited 2 times in total.
Make sure you're using
and make sure you included "Irrlicht.h". If you did both, then I'm not sure what the problem is.
Code: Select all
using namespace irr;-
bluebunny76
- Posts: 4
- Joined: Wed Oct 28, 2009 11:53 pm
About ^
I searched on google... and so on do i realy have to install DirectX SDK from microsoft? its 500mb Sad is'nt ther some other way to get the needed files? thats smaller??
-
bluebunny76
- Posts: 4
- Joined: Wed Oct 28, 2009 11:53 pm
Ok ?? Sorry but i am...
Code: Select all
#include <irrlicht.h>
using namespace irr;
#ifdef _IRR_WINDOWS_
#pragma comment(lib, "Irrlicht.lib")
#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
int main()
{
IrrlichtDevice *device =
createDevice(irr::video::EDT_SOFTWARE, dimension2d<u32>(640, 480) 16,
false, false, false, 0);
if (!device)
return 1;
device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getScenceManager();
IGUIEnviroment* guienv = device->getGUIEnviroment();
guienv->addStaticText(L"Hello World! This is the Irrlicht OpenGL render!",
rect<s32>(10,10,260,22), true);
device->drop();
return 0;
}
20 C:\Projects\Untitled2.cpp `IVideoDriver' undeclared (first use this function)
20 C:\Projects\Untitled2.cpp `driver' undeclared (first use this function)
21 C:\Projects\Untitled2.cpp `IGUIEnviroment' undeclared (first use this function)
21 C:\Projects\Untitled2.cpp `guienv' undeclared (first use this function)
[/img]
Is it coz im using irrlicht-1.6??
Re: Ok ?? Sorry but i am...
No, it is because you haven't read up on namespaces yet in your c++ book. Do that. Then either add corresponding namespaces before each variable or do it like the Irrlicht examples and add all the typical namespaces of Irrlicht at the start of your program.bluebunny76 wrote: Is it because I'm using irrlicht-1.6?
A more extensive explanation can be found when you read through the source of example 01 "Hello World" which can be found in the examples folder of Irrlicht.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm