Borland C++ Builder?
by Animesh Karna · in Technical Issues · 04/03/2002 (12:10 pm) · 6 replies
Has anyone managed to successfully compile Torque with Borland C++ Builder? I couldn't get past OpenGl2D3d: it didn't like the assembly code.
If you managed to get this to build, could you give me some idea as to what changes you needed to make? Thanks!
If you managed to get this to build, could you give me some idea as to what changes you needed to make? Thanks!
#2
http://groups.google.com/groups?hl=en&ie=utf-8&oe=utf-8&threadm=435caef4.0204030713.53fb4084%40posting.google.com&rnum=1&prev=/groups%3Fhl%3Den%26ie%3Dutf-8%26oe%3Dutf-8%26scoring%3Dd%26q%3Dinline%2Bassembler%2Bborland%2Bc%252B%252B%26btnG%3DGoogle%2BSearch
You need to have TASM installed to compile inline assembler with BC++.
I'm interested in using BC++ with Torque too. What are the real roadblocks ? Recompiling is obviously the best solution, but failing that :
Perhaps BC++ can be used to make a DLL containing game code that is loaded by the engine and executed. This would require exporting somehow the Torque engines functions to make them accessible within BC++.
3D GameStudio (another engine) allows you to create a dll, and then define headers for your functions in the built-in scripting language. In your DLL, you can get function pointers for the script functions and variables by name (a string), so you still have all the functionality of the script language in your own language. Perhaps a similar solution could be provided with Torque.
Borland's tools (inc Delphi) are excellent for making DLLs, but VB aint so good (not that I care ;^) ).
Gary.
04/03/2002 (5:28 pm)
According to AgentX here :http://groups.google.com/groups?hl=en&ie=utf-8&oe=utf-8&threadm=435caef4.0204030713.53fb4084%40posting.google.com&rnum=1&prev=/groups%3Fhl%3Den%26ie%3Dutf-8%26oe%3Dutf-8%26scoring%3Dd%26q%3Dinline%2Bassembler%2Bborland%2Bc%252B%252B%26btnG%3DGoogle%2BSearch
You need to have TASM installed to compile inline assembler with BC++.
I'm interested in using BC++ with Torque too. What are the real roadblocks ? Recompiling is obviously the best solution, but failing that :
Perhaps BC++ can be used to make a DLL containing game code that is loaded by the engine and executed. This would require exporting somehow the Torque engines functions to make them accessible within BC++.
3D GameStudio (another engine) allows you to create a dll, and then define headers for your functions in the built-in scripting language. In your DLL, you can get function pointers for the script functions and variables by name (a string), so you still have all the functionality of the script language in your own language. Perhaps a similar solution could be provided with Torque.
Borland's tools (inc Delphi) are excellent for making DLLs, but VB aint so good (not that I care ;^) ).
Gary.
#3
also this may be of interest : http://viewcvs.tortall.net/yasm-doc/design/goals/chapter.sgml?annotate=1.1&cvsroot=YASM
Gary.
04/03/2002 (8:30 pm)
OK, forget TASM, you can use NASM as used with VC++. See this : http://www.octium.net/nasm/forum/viewtopic.php?topic=108&forum=7also this may be of interest : http://viewcvs.tortall.net/yasm-doc/design/goals/chapter.sgml?annotate=1.1&cvsroot=YASM
Gary.
#4
Here's why Torque may be hard to compile with Borlands compilers. ***Please refute this if you can***
- Functions written in assembler must assume a calling convention, as parameter names are not used.
- There is a major binary incompatability between VC++ and BC++ due to calling conventions (I think its the VC++ fastcall method that is different or not supported in BC++)
- Therefore, all assembler functions in Torque would have to be rewritten for Borlands calling convention.
Any learned opinions on this ? If this is true, how do/will they compile Torque on Linux ?
04/03/2002 (8:41 pm)
Another thought :Here's why Torque may be hard to compile with Borlands compilers. ***Please refute this if you can***
- Functions written in assembler must assume a calling convention, as parameter names are not used.
- There is a major binary incompatability between VC++ and BC++ due to calling conventions (I think its the VC++ fastcall method that is different or not supported in BC++)
- Therefore, all assembler functions in Torque would have to be rewritten for Borlands calling convention.
Any learned opinions on this ? If this is true, how do/will they compile Torque on Linux ?
#5
extern "C"
{
void detectX86CPUInfo(char *vendor, U32 *processor, U32 *properties);
}
04/04/2002 (11:47 am)
For unix and windows (gcc and visual C), external asm functions are specified in the c++ code using the extern "C", statement, for exampleextern "C"
{
void detectX86CPUInfo(char *vendor, U32 *processor, U32 *properties);
}
#6
ive purchased the torque engine a while ago and am getting the borland compiler and wondering if ill be able to use it so any help would be appreciated
07/15/2003 (9:15 pm)
So does the NASM fix everything or is it still not compilingive purchased the torque engine a while ago and am getting the borland compiler and wondering if ill be able to use it so any help would be appreciated
Torque Owner John Quigley
But you don't need opengl2d3d if you have a decent opengl driver. I suggest starting with just the core projects needed for the torque demo (ljpeg, lpng, lungif, zlib, and the files in torque demo.dsp). Hopefully you should at least be able to get that up and running.