half-solved: editbox in hello world?

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
cyanide
Posts: 13
Joined: Sat Sep 03, 2005 9:39 pm

half-solved: editbox in hello world?

Post by cyanide »

okay. i've got a very weird problem. i can't add an editbox. not even in the hello world example for dev-c++. if i do, i get the standard windows error. the "send report/don't send" screen. i just copied the statictext adding function and changed the function name to addEditBox. it should work, as far as i know, but it doesn't. i use the standard irrlicht dll for win32-gcc.

FTW???

-EDIT: this problem stopped occuring when i compiled in debug mode once. then, i went back to normal, non-debugging mode, and it still worked.
Last edited by cyanide on Sun Sep 24, 2006 7:21 am, edited 1 time in total.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Well, shall we guess what you did !?!?!
Show us your code (only the relevant part), please...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
cyanide
Posts: 13
Joined: Sat Sep 03, 2005 9:39 pm

Post by cyanide »

well, to recreate my last bit of code... the hello world edit, that is... just put

guienv->addEditBox(L"Hello World! This is the Irrlicht Apfelbaum Software renderer!",
rect<int>(10,10,260,22), true);

right under

guienv->addStaticText(L"Hello World! This is the Irrlicht Apfelbaum Software renderer!",
rect<int>(10,10,260,22), true);

in an otherwise unmodified irrlicht 1.1 folder, freshly unzipped with the 32-bit gcc dll put in the windows folder. used on windows xp sp2, dev-c++ 4.9.9.2, from the .dev file.

does no-one else have this problem?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Hmmm, I did it like you said and it works perfectly !!!
Except that the edit box and the static text are located at the same position (change the rect of one of them)...
So the error must be caused somewhere else...

Can the Irrlicht dll be found by the program ???
Just place a copy of the right dll into the exe folder or windows/system32 folder !!!
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
cyanide
Posts: 13
Joined: Sat Sep 03, 2005 9:39 pm

Post by cyanide »

uhm, yeah. i just thought that i might have changed the dll's. so i copied the original dll to my windows folder (same size as what i had), and no difference. any example i hadn't modified screwed up as well. so i just unzipped the whole folder again (kept a separate folder for the project i'm working on, so the irrlicht folder is just for modifying the dll)

... just tried that, and it still gives the same error. clean folder. straaaaange.

currently re-installing dev-c++, in the desperate hope that it'll let me compile irrlicht-apps again...


wtfworthy. i replaced everything of the original irrlicht 1.1 folder (and the dll in the system32 dir), and yet everything in that folder keeps on locking up. the stuff in my project folder won't lock up unless i try to add an editbox. ugh...

the strangest part is, that my project files still work. unless, of course, i try the dreaded guienv->addEditBox(...);.

seems that it can't load sydney.md2 anymore, and that's why all the examples stopped working suddenly...
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

cyanide wrote:well, to recreate my last bit of code... the hello world edit, that is... just put

guienv->addEditBox(L"Hello World! This is the Irrlicht Apfelbaum Software renderer!",
rect<int>(10,10,260,22), true);

right under

guienv->addStaticText(L"Hello World! This is the Irrlicht Apfelbaum Software renderer!",
rect<int>(10,10,260,22), true);

in an otherwise unmodified irrlicht 1.1 folder, freshly unzipped with the 32-bit gcc dll put in the windows folder. used on windows xp sp2, dev-c++ 4.9.9.2, from the .dev file.

does no-one else have this problem?
They are in the same position....

Code: Select all

	guienv->addEditBox(L"Hello World! This is the Irrlicht Apfelbaum Software renderer!",
		rect<int>(10,10,260,22), true);

right under

	guienv->addStaticText(L"Hello World! This is the Irrlicht Apfelbaum Software renderer!",
		rect<int>(10,10,260,22), true);
to

Code: Select all

	guienv->addEditBox(L"Hello World! This is the Irrlicht Apfelbaum Software renderer!",
		rect<int>(10,10,260,22), true);

right under

	guienv->addStaticText(L"Hello World! This is the Irrlicht Apfelbaum Software renderer!",
		rect<int>(10,15,260,27), true);
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Yes, that's what I mentioned, too... ;)
But this doesn't explain why the exe crashes, it should run with no problems...

Well, another guess:
Did you try OpenGL as driver (the gcc dll doesn't support DX) ?!?!?
Be sure all used meshes can be found by the exe, or remove all mesh loadings from the source (comment them out) so only the gui will be created...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
cyanide
Posts: 13
Joined: Sat Sep 03, 2005 9:39 pm

Post by cyanide »

they can be found by the exe. it turns out my md2 loaded is as corrupted as my editbox. i've always used opengl... i know dec-c++ can't handle dx by default, and the irrlicht source won't compile either so i can't add dx support. the tutorial files seem to work fine once i comment out all md2 loading.

i admit it, i screwed up my computer. -EDIT: no, my computer is just insane.:EDIT-

could it be that it's somehow using a different dll than the one i put in the windows/system32 folder or the one i put in the exe's folder? where does irrlicht look for it's dll's?

newsflash: it does work, with editbox and all, under debug mode. what is different in debug mode?

-EDIT: somehow, i removed the bug by compiling in debug mode once and then just compiling normally again. i guess i don't desperately need an answer anymore, but still... if anyone's got a clue what has gotten into my computer, i'll be glad to hear.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I always stick the irrllicht .dll in the project folder along with all the files that way you know for certain which one it's using, though of course if you've stuck it elsewhere and it's the only one it should have access to then it should also be correct...
Image Image Image
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

An exe always looks first in it's own folder for dlls and if it can't be found there it goes through the folders defined in the environment var PATH...

With Dev sometimes you'll have to "build all", because Dev doesn't handle dependencies of include files correctly (what Code::Blocks handles perfectly) !!!
But this should only be if there are more than one files in the project...
And because the most demos are build out of just one file (main.cpp) it shouldn't matter...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
zeno60
Posts: 342
Joined: Sun May 21, 2006 2:48 am
Location: NC, USA
Contact:

Post by zeno60 »

A good habit to get into is to press CTRL+F11 before you F9 (Compile).
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

correct Ctrl+F11 is "build all"... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply