C++Builder with Irrlicht

A forum to store posts deemed exceptionally wise and useful
razor7
Posts: 6
Joined: Fri Jun 25, 2004 3:38 am
Contact:

Post by razor7 »

Hey...look at this...very weird behaviour

The compilation in my C drive doesn´t works, but if i build the entyre path like yours in my D drive, including the DXSDK stuf, it works...hehe.

Maybe you want to check tha compilation in your C Drive to see if it´s a common issue...

Also some examples doesn´t work with some video renderers, and some video renderers doesn´t work in full or windowed screen. I will make a list of errors, but the commons are some exceptions and division by 0.

Thanks...keep in touch.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

For avoid "Divide by zero" error
always you must include:

Code: Select all

#if defined(__BORLANDC__) || defined(__BCPLUSPLUS__)
  _control87((_control87(0, 0) | ~0011), MCW_EM);         //float.h
#endif
before ctreateDevice function,
in your code.

I'll be glad to see your list with errors to correct.

For bpr - This is a xml file and can be opened with notepad or wordpad.
Make your correction and save. Sometimes Borland IDE cannot save some corrections inside.
razor7
Posts: 6
Joined: Fri Jun 25, 2004 3:38 am
Contact:

Post by razor7 »

OK...i´ll inspect the XML code in the BPR, and the _control87 stuf works ok but, ¿what it means to do?, i don´t know.

i´ll try to send the buglist...

Regards
Ale

BCB6 linker error

Post by Ale »

I just try to run Irrlicht 6.0 with CppBuilder 6.0 and, after an error free compilation, I also get the same linker fatal error as Razor7 had last month :

"[Linker Fatal Error] Fatal: Expected a file name:"

Since I do not have a D: drive, I cannot try to move from C: to D: and I am stuck. :evil:

Any idea about this problem ?
Guest

Post by Guest »

Open your bpr files with notepad and replace all "d:\" with "c:\".
If you not get success, I''ll try to replace my libs on c:\ to see those kind of error.
razor7
Posts: 6
Joined: Fri Jun 25, 2004 3:38 am
Contact:

Post by razor7 »

i´ve replaced all d:\ with c:\ but nothing happens...
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

And you cannot use borland port?
Next week I'll try to compile all under c:\
But, this is more with borland project format related by me, then with Irrlicht port
Ale

Post by Ale »

Same for me : I replaced all D:\ with C:\ in the .bpr file, and always get the same error :
"[Linker Fatal Error] Fatal: Expected a file name:"
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

I've just replaced all sources on c:\ drive, and cannot get any error. I've replaced DXSDK on c:\ too.
All runs ok without compliler or linker errors.

Have you updated BCB version ?
I cannot help while can't reach this kind of error.

You can make your own project via my tutorial.
At beginning you can import VC - .dsp or .dsw Irrlicht project file in BCB, and after that must only to assign the right paths.
This will take not more than 20 minutes.

Another way is - To start from empty project on c:\ and after that to post project for testing of this kind of error, but I can to do that the next week..
Ale

Post by Ale »

[quote="etcaptor"]You can make your own project via my tutorial.
At beginning you can import VC - .dsp or .dsw Irrlicht project file in BCB, and after that must only to assign the right paths.quote]

Although I am not a specialist, i have tried to do that, and here is the result :

1/ After conversion from VC++ to BCB6, the files i got are quite different that what you have delivered in you own example :
See Image 1 = your example, versus Image 2 = my conversion.
- i do not have a Quake3Map.cpp project file, but instead a Quake3Map.bpf
- no Form1

2/ Compilation is ok, except some warnings (See Image 3) :
- W8071 (conversion may lose significant digits)
- W8080 (identifier' is declared but never used)

3/ Again thit Linker Fatal Error "Fatal: Expected a file name:"

Image
Acid_Qpus

Post by Acid_Qpus »

How About just to upload precompiled Dll and lib for borland c++ 5.5 compiler ?
Ale

Post by Ale »

etcaptor wrote:Another way is - To start from empty project on c:\ and after that to post project for testing of this kind of error
I did it, always with the same example (2.Quake3Map).
Again, compilation ok (no error, no warning)
Again, linker error Fatal: Expected a file name.

This BCB6 project can be downloaded here for testing :
http://alainlecomte.free.fr/Quake3Map.zip
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Ale,
I wrote my post about compiling of irrlicht engine with C++Builder.
About QuakeMap example, I start a new project with BCB, and then add main.cpp file to the project. In the form I put button. I have not use VC dsp convertion tools there.
Alvays when compile examples I start a new project, then I fill parameters
Project->Options->Directories/Conditionals
and in Conditional defines listbox add /paste/ this:
atanf=(float)atan;cosf=(float)cos;sinf=(float)sin;acosf=(float)acos;asinf=(float)asin;tanf=(float)tan;sqrtf=(float)sqrt;atan2f=(float)atan2; fmodf=(float)fmod

And use _control87((_control87(0, 0) | ~0011), MCW_EM);
before CreateDevice fuction calling.

With this technique I can compille all of exampless. More, I get running newton physic engine with BCB.


Acid_Qpus, I've tryed same with BCB5. There only some a litle of changes, but I lost all my partitions, when I was tired and trying Linux.
For two weeks I can almost to restore all my BCB6 project from scrab, but still not working with BCB5. Next week I can start with BCB5 port of Irrlicht.
Ale

Questions about the tutorial

Post by Ale »

I have 2 questions about your tutorial Etcaptor :

1/ You write in "2. DirectX linking related" :
a- Use COFF to OMF Converter located on C++Builder/bin directory like: coff2omf.exe d3dx9.lib d3dx9bor.lib
b- Change the name of d3dx9.lib original file and the rename d3dx9bor.lib to d3dx9.lib
c- Use Borland Import lib tool located on C++Builder/bin directory like: /implib.exe/ implib d3dx9.lib d3dx9d.dll

My understanding is that with lines a and b, you create a d3dx9.lib with OMF conventions, from the original d3dx9.lib COFF
and with line c, you also create a d3dx9.lib with conventions OMF, from the original dll (COFF conventions).
So this 2nd d3dx9.lib created in c will overwrite the one created in a + b : Am I wrong ?


2/ This problem of conversion from COFF to OMF should also exist for the Irrlich.dll and Irrlich.lib files :
Did you also have to convert them to move from Microsoft VC to Borland ?
:?:
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

About 1/ - without line -c you will get linker errors. coff2omf.exe and Import lib tools are not a equivalent .
With coff2omf.exe you can convert COFF to OMF,
and with Import lib tool you can import related information from lib to dll.

About 2/ -No,
After compiling Irrlicht with BCB, you don't need some of these tools.
All is ready after compiliing.
Post Reply