C++Builder with Irrlicht

A forum to store posts deemed exceptionally wise and useful
Post Reply
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

C++Builder with Irrlicht

Post 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.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Wow, that's cool. A lot of people were asking for this. Did have to change a lot of code for this?
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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.
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Post by soconne »

I'M SO HAPPY :lol:
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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:
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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.
cmoibenlepro
Posts: 237
Joined: Thu May 27, 2004 3:18 pm
Location: Canada

Post 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:
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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/.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

TUTORIAL FOR COMPILING OF IRRLICHT WITH C++BUILDER

Post 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
Guest

BCB6 project files end quake3map example was uploaded

Post 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.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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.
razor7
Posts: 6
Joined: Fri Jun 25, 2004 3:38 am
Contact:

Linker Fatal Error

Post 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
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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.
razor7
Posts: 6
Joined: Fri Jun 25, 2004 3:38 am
Contact:

Post 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...
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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.
Post Reply