Page 1 of 1

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

Posted: Thu Jun 24, 2004 2:53 pm
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

Posted: Thu Jun 24, 2004 2:54 pm
by loki1985
/ADD:

i also tried to change from console app to windowed app, nothing helped...
:(

Posted: Thu Jun 24, 2004 3:46 pm
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.

Posted: Fri Jun 25, 2004 10:57 am
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 !!! :(

Posted: Fri Jun 25, 2004 12:54 pm
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.

Posted: Fri Jun 25, 2004 1:28 pm
by Guest
wow! thanx a lot! finally it works!!!
:D

Posted: Sat Jun 26, 2004 5:05 pm
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.

Posted: Mon Jun 28, 2004 1:26 am
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

Posted: Mon Jun 28, 2004 7:04 am
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!,