techdemo in devc++ = no compiler errors but demo won't start

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
loki1985

techdemo in devc++ = no compiler errors but demo won't start

Post by loki1985 »

hi folks!

sorry to bother...

my prob:

i just compiled the techdemo using devc++ (worked after upgrading from 4.0 to 5 beta, like suggested on the forum), i get no errors (just 2 warnings about "no new line at EOF" bla bla).

when i try to start the resulting exe, nothing happens...
then i run it from cmdline, and got following outpout:

Code: Select all

C:\irrdemo\demoproj\devcpp>techdemo
uncompress(): hello, hello!
gzread(): hello, hello!
gzgets() after gzseek: hello!
inflate(): hello, hello!
large_inflate(): OK
after inflateSync(): hello, hello!
inflate with dictionary: hello, hello!
i just imported the .dsp from irrlicht-0.6/examples/Techdemo, and added correct paths to libs and headerfiles.....

anybody knows some hint?

thanx in advance and greets,

---loki
loki1985

Post by loki1985 »

/ADD:

i also tried to change from console app to windowed app, nothing helped...
:(
darkraven
Posts: 29
Joined: Sat Mar 06, 2004 5:54 am
Location: Florida
Contact:

Post by darkraven »

Don't know if this is the problem cause its been a while since I've had that happen to me. But is the irrlicht.dll for the dev c++ in the system path or in the same folder as the executable. If I recall I got the same thing when I ran the executable without the dll in the path but then again I could also be wrong as it was a while go and my memory is shot to hell with all the caffine I intake.
loki1985

Post by loki1985 »

nope, the devcpp dll is in the path as well as in the exe file's dir...

so, still nothing happens...

did anyone ever succeed in compiling the techdemo using devcpp ????

plz help !!! :(
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

the fix is very simple, but I do not know exactly why it is required. Simply change WinMain to main. The aggravating thing is Dev-cpp can compile Windows applications using WinMain, but something about using WinMain with irrlciht Dev-cpp doesn't seem to like. It might have something to do with calling conventions. I believe that WINAPI is a typedef for _stdcall whereas the default calling convention is _cdecl. Perhaps the VC++ version of the enginecan use the _stdcall convention whilethe Dev-cpp version must use _cdecl. That last is just a guess, however, I'm really not sure.
Guest

Post by Guest »

wow! thanx a lot! finally it works!!!
:D
Guest

Post by Guest »

Hey Guest, by any chance, could you post how you got your Dev C++ to compile? I followed the tutorials, but I still can't get it to work. Thanks for your help.
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

try the turtorial on setting up dev C++ it is pretty much work for word. Or if you are really lazy someone made a devpak(Or something like that) that has everything you need already set up for dev C++. do a search in the forum
l0calh05t
Posts: 68
Joined: Wed Apr 07, 2004 7:08 pm

Post by l0calh05t »

Electron wrote:the fix is very simple, but I do not know exactly why it is required. Simply change WinMain to main. The aggravating thing is Dev-cpp can compile Windows applications using WinMain, but something about using WinMain with irrlciht Dev-cpp doesn't seem to like. It might have something to do with calling conventions. I believe that WINAPI is a typedef for _stdcall whereas the default calling convention is _cdecl. Perhaps the VC++ version of the enginecan use the _stdcall convention whilethe Dev-cpp version must use _cdecl. That last is just a guess, however, I'm really not sure.
Hmm, yeah had the same errors and the program produced a file foo.gz containing a text file which says hello, hello!,
Raw data for raw nerves

My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
Post Reply