Page 1 of 8

C++Builder with Irrlicht

Posted: Wed Jun 16, 2004 12:36 pm
by etcaptor
Hi friends,
Last day I've trying to compile Irrlicht with BorlandC++Builder 6.
Here is one screenshot:

Image

I'm still not finished my experiment.
For now I can run examples only with EDT_DIRECTX option. With EDT_OPENGL I get "Floating point dIvision by zero error".

Also for CreateDevice function still can't set default parameters :wink:
When I'm finish can explain how to compile Irrlicht with BCB, or upload project files.

Posted: Wed Jun 16, 2004 1:20 pm
by niko
Wow, that's cool. A lot of people were asking for this. Did have to change a lot of code for this?

Posted: Wed Jun 16, 2004 2:02 pm
by etcaptor
No, only

Code: Select all

	if (data.header.id != 0x4D4D)
		return 0;// false;
in c3meshFileLoader.cpp - 0 insteed false.


One addition file for hack borland exception handler
///////////file bcbmath.h//////////////

Code: Select all

int _RTLENTRY _EXPFUNC _matherr(struct _exception* e)
{
	e->retval=1.0;
	return 1;
}
-to change borland behaviour of error handling for sqrt function

AND inline asm code in 3 files are defined like not inline function.

But
Still can resolve problem with CreateDevice fuction in irrlicht.h file.
For now there I've changed this function without default parameters.

Posted: Wed Jun 16, 2004 8:09 pm
by soconne
I'M SO HAPPY :lol:

Posted: Wed Jun 16, 2004 8:59 pm
by etcaptor
Well, now I can to say, that all works. Even OpenGL.
I will make some tests for conformability /VC and DevCPP - must still works 8) / and then will post all to irrlicht users.

My main idea was creating of some tools for Irrlicht. Even I start to work with SceneNode Modifier - /something like Object inspector/ using Irrlicht GUI, but this way was very slow. So, I've leaved this app and starting to get BCB release of Irrlicht.
The Main good new is that litle part of Irrlicht code was changed - only some rows
:lol:

Posted: Thu Jun 17, 2004 4:35 pm
by etcaptor
My work is complete.
I will upload litle tutorial and borland project on my site this week.

Next plan:
I found borland Kylix 3 Open edition.
Good RAD for Linux with c++ support.
So, I'll try to get Irrlicht with Kylix together :lol:
No promise that this will be so soon.

Posted: Fri Jun 18, 2004 2:42 am
by cmoibenlepro
cool to know it works! :D

Do you know if C++ Builder 5 (free edition) is better than GCC (Dev-c++) that I use?
I mean for optimisations, executable size...

I will try it! :wink:

Posted: Fri Jun 18, 2004 6:53 am
by etcaptor
C++Builder 6 compiler v.5.6 is by me one of the best compilers. For size optimizations, i thinks that this is more related with amount of inluded dlls in lib.
For example when I compile without d3dx9 dll, size of collision example demo is only 40 k.
I can say that more important when you choucr IDE is compiling time.
With borland IDE i get most best result, then follow MSVC, and DevCPP is slower /DevCPP is maded with Delphi object pascal/.

TUTORIAL FOR COMPILING OF IRRLICHT WITH C++BUILDER

Posted: Mon Jun 21, 2004 11:40 pm
by etcaptor
Well,
Below is simple tutorial. All is short described, because English is not my native language. Maybe C++ is easy then English for me :lol:

http://etcaptor.f2g.net/Tutorials/Irrli ... rlicht.htm
I've make Irrlicht to run even with C++Builder 5. Borland compiler v.5.5 is free to use and tomorow I'll post BCB projects on my site.

It's possible that I've overlooked something, but in this case you can ask me in this forum

BCB6 project files end quake3map example was uploaded

Posted: Wed Jun 23, 2004 1:34 am
by Guest
I've upload BCB6 project for compiling of Irrlicht with Borland C++Builder 6.
There are just some changes in Irrlicht sources.
Here is the link:

http://etcaptor.f2g.net/Tutorials/Irrlicht/BCB6Irr.zip

Don't forget to change DXSDK path in Borland project, and some other paths.

Posted: Wed Jun 23, 2004 1:37 am
by etcaptor
Sorry, forgot to login :roll:

When you create demos with BCB, dont forget to check Project->Option->Compiler "Treat enum types as ints".

Wlse key mapping not works well.

Linker Fatal Error

Posted: Fri Jun 25, 2004 3:40 am
by razor7
Hello, i´ve set up Builder to compile the sourcecode that you have fixed...but the linker throws me this error:
"[Linker Fatal Error] Fatal: Expected a file name:"

I think that it must be a dumb error...but i can´t solve it...
Any help?

Thanks

Posted: Fri Jun 25, 2004 4:17 am
by etcaptor
What source code - of example, or of engine bpr?
Check in project options right directories. Some directories must be changed. Don't forget to read tutorial
http://etcaptor.f2g.net/Tutorials/Irrli ... rlicht.htm
/2. DirectX linking related:/

I need to know exactly name of expected file.

Now I use only C++Builder with Irrlicht, and there no problems.
All works fine - I made third person camera, newton tests, and other things without any problems.

Posted: Fri Jun 25, 2004 2:25 pm
by razor7
Firts it compiled ok...the dll and the example...but i´ve erased everything to organize all my files in c:\irrlicht, note that i have erased all the files and replaced with the original from irrlicht and your C++ Builder port...everything in this directory is original and i´ve changed the paths in BPR file.

INCLUDES:
c:\DXSDK\include
c:\illricht\include //with modified headers
c:\illricht\source\include //with modified headers

LIB:
c:\illricht\bin\C++Builder6
c:\illricht\lib\C++Builder6

The linker throws just that...no filename...and the directoryes are set up...

Maybe my compiler doesn´t work fine...also with your supplied dll and lib, and trying to compile your demo the compiler throwsme the same message.

I´ll try to reinstall Builder...

Posted: Fri Jun 25, 2004 2:56 pm
by etcaptor
Strange,
I 've tried this over 5 times and all works.
I hope, that I've no omited something.
Have you install bcb6 updates?
By the way in sources for right works of VC6 after my changes - funcasm must be set as static.

If you not sure, that all libs are included - you can to add lib files in project manager.