Compiled examples causing Illegal operation

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Compiled examples causing Illegal operation

Post by Domarius »

Hi everyone - I'm new to Irrlicht, and really looking forward working with it.

I open "1. Hello World\example.dev", check that the "\include" folder is added to the "Include Directories" list, and that the 3 library files from "\lib\DevCpp" are linked.
Hit "compile and run".

The window starts to appear (the one that will have the "hello world" and the sydney model girl in it), but only the border gets drawn, and I get one of those "example.exe has encountered a problem and needs to close. We are sorry for the inconvenience." error windows. (I'm using WinXP)

This also happens when following the Irrlicht Dev-C++ tute.
(Which actually seems to have some errors in it - I think "DT_SOFTWARE" should be "EDT_SOFTWARE", judging from the original "Hello World" example. And it says to add "\include" to the "Include Directories" list, but the screen shot shows it added to the "Libraries Directories" list.)

I pasted the "Irrlicht.dll" from the "bin\DevCpp" folder to "windows\system32"
If I use the "Irrlicht.dll" from the "bin\VisualStudio" instead, I get a system error saying something about not finding something in Irrlicht.dll, so I figure that's the wrong one to use.

All the 'template' examples that come with Dev-C++ work.

Any suggestions on why it crashes?
Guest

Post by Guest »

did you try to compile and run untouched or did you set them to the EDT_DIRECTX8 or EDT_DIRECTX9 types in the createDevice function. I had a problem like you have with anything set to the directx but worked find with software and opengl types. My problem was fixed by doing the the instructions in http://irrlicht.sourceforge.net/phpBB2/ ... php?t=1700 And now I can compile and run all examples using directx8, opengl. I can also run directx9 but with some problems. You may need to recompile irrlicht using dev c++ following those instructions. It worked for me and maybe work for you to.
pheadbaq
Posts: 33
Joined: Wed Dec 31, 2003 4:41 pm
Contact:

Post by pheadbaq »

The following forum thread may help you:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=1644

It ends up doing everything with OpenGL, but hey if it works it works. I had the same problem as you, and like "Guest" said, using EDT_SOFTWARE or EDT_OPENGL worked perfectly. The DevPak you'll find on that thread may not fix problems compilling with DirectX, but it makes project setup with OpenGL a breeze. 8)
Pronunciation: 'feedback' ;)
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Re: Compiled examples causing Illegal operation

Post by Domarius »

Unfortunatley, I already am using EDT_SOFTWARE, I never changed it. :(

I just tried the 're-building Irrlicht.dll' tip in the thread that Guest posted.

It didn't finish compiling - I got a compiler error;
4 D:\Downloads\irrlicht-0.5\source\source\CDirectX8Texture.cpp
In file included from CDirectX8Texture.cpp


The line (4) was
#include "CDirectX8Texture.h"

Actually, there were a whole heap of compiler errors after that, but I know that one error causes a domino effect, so I won't bother posting the rest.

It's really strange, because the file CDirectX8Texture.h does exist. (The path shown above is correct - I just extracted the 'source.zip' where it was, hence the extra 'source' folder)

Any ideas why it's "missing" anyone?
Last edited by Domarius on Fri Mar 12, 2004 5:21 am, edited 1 time in total.
pheadbaq
Posts: 33
Joined: Wed Dec 31, 2003 4:41 pm
Contact:

Post by pheadbaq »

Have you tried EDT_OPENGL yet? Just curious how that turns out.
Pronunciation: 'feedback' ;)
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Post by Domarius »

Argh - I just tried it again - different results :? But much better.

Software mode DOES work.

DIRECTX8 and 9 Don't

But OPENGL works FINE. Heh, the reason I was holding off on testing that pheadbaq, is because my Nvidia 3D glasses only work with Direct3D apps - I just didn't want to find out that I'd be stuck with OPENGL :wink:

But all things considered, I'm pretty happy now. :D The DirectX thing will probably be worked out in the long run anyway.

Thanks guys - I guess it was some kinda temporary problem after all. I swear, I already tried rebooting before. Wierd.
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

Hello Domarius, did you rebuild the Irrlicht.dll with the DirectX 9.0 SDK? That may be the problem regarding the DirectX errors.
________
MEXICO HOTELS
Last edited by disanti on Tue Feb 22, 2011 8:03 am, edited 1 time in total.
Guest

Post by Guest »

Domarius, Are you using .5 version or irrlicht or .6. I don't know exactly what is different in the release but when I recompiled irrlicht.dll I was using .6 and followed the instructions from that other thread that I posted a link to and it compiled with out touching anything in the code. The only thing I did have to do is I did have to move the jpeg library and the zlib library into the respected folders under source cause the folders didn't contain compiled versions of the them but it compiled without errors and the only problem I now have is directx9 not createing mip map levels using dev c++ but that to me isn't a big deal.
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Post by Domarius »

disanti wrote:Hello Domarius, did you rebuild the Irrlicht.dll with the DirectX 9.0 SDK? That may be the problem regarding the DirectX errors.
Hi disanti, good to see you here.

Well, I did the "Check for Updates" thing on Dev-C++, and it downloaded something, seemed like an update, I remember seeing something like "Just a few new things this time" but nothing about DirectX, so I figured I already had it anyway, since I only just recently downloaded Dev.

So I don't know. But I'd appreciate any info.
Anonymous wrote:Domarius, Are you using .5 version or irrlicht or .6.
Geez, I didn't know they released a new one again - I thought I had the latest one. I have .5
It will be a few days till I can download .6 and try it. I will post what happens.


Again, thanks for the suggestions guys. I would really like to get DirectX to work.
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Post by Domarius »

Okay, I am using Irrlicht .6 now, and I think I have narrowed the problem down to a file I'm missing (I suppose it's this elusive "DX9 Dev pack" that I can't find.)

Judging from the compile errors I'm getting when I try to re-compile Irrlicht.dll, I think I need the file d3d8.h, and whatever else it's associated with.

These are the compile errors that lead me to that conclusion.
(the lines in green are the lines of code associated with the error above it)

4 D:\Downloads\irrlicht-0.6\source\source\CDirectX8Texture.cpp
In file included from CDirectX8Texture.cpp
18 D:\Downloads\irrlicht-0.6\source\source\CDirectX8Texture.h:13
d3d8.h: No such file or directory.
#include <d3d8.h>
4 D:\Downloads\irrlicht-0.6\source\source\CDirectX8Texture.cpp
In file included from CDirectX8Texture.cpp
28 D:\Downloads\irrlicht-0.6\source\source\CDirectX8Texture.h
type specifier omitted for parameter `IDirect3DDevice8'
//! constructor CDirectX8Texture(IImage* image, IDirect3DDevice8* device, u32 flags);
56 D:\Downloads\irrlicht-0.6\source\source\CDirectX8Texture.h
syntax error before `*' token

What does d3d8.h belong to, and how do I get it? I did the "Check for updates" in Dev-C++, and this is the message I see;
You have... 1.616
Available... 1.617
* Couple minor new things, see change log for details
* Depeche Mode rules!

Kip
I download and update, nothing about a DX dev pack.
darkraven
Posts: 29
Joined: Sat Mar 06, 2004 5:54 am
Location: Florida
Contact:

Post by darkraven »

You haven't found the DX9 Dev Pack? You can go into dev c++'s ide, tools menu and select check for updates. When the window appears where it says select mirror select planetmirror.com and check for updates. It should popup. If it doesn't then you have installed.

An alternative option is to go straight to planetmirror.com and download from their. http://public.planetmirror.com/pub/devcpp/

Hopefully that will help once its installed it will install both dx8 and dx9 files.
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Post by Domarius »

Thanks for that, darkraven. Will reply after I try it.

I'll download it directly, because I don't know what you meant by "Dev C++'s IDE". I have been trying the "check for updates" in the menu on the actual Dev-C++ program itself, if that's what you mean.
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

Just to let you know Dev C++ IS an IDE(Integrated Development Environment) not a different product.
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Post by Domarius »

Ah, and until now, the only meaning I knew for IDE was the hard drive standard :)

Okay I have the DirectX pack for Dev-C++, now I'm getting a new error.

36 D:\Downloads\irrlicht-0.6\source\source\CFileSystem.h
ISO C++ forbids declaration of `IWriteFile' with no type
virtual IWriteFile* createAndWriteFile(const c8* filename, bool append=false);

The green line is the line associated with the error.

Should I just download every darn pack available for Dev-C++? Is that what you're supposed to do? If not, is there a list of what packs you need? If so, it should be added to that FAQ thread that's all about "How to get DirectX8 in Dev-C++".
Post Reply