Borland C++ Builder

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
marijan2k
Posts: 1
Joined: Thu Oct 30, 2008 8:34 am

Borland C++ Builder

Post by marijan2k »

Would you be so kind and help:

Does anybody has any experience with Borland C++ Builder and converting VC++ projects.

I am getting a message on very first HalloWorld project:
[ILINK32 Error] Error: Unresolved external '__stdcall irr::createDevice(irr::video::E_DRIVER_TYPE, const irr::core::dimension2d<int>&, unsigned int, bool, bool, bool, irr::IEventReceiver *, const char *)' referenced from D:\_CDESW8\TEST\3D_ENGINE\IRRLICHT-1.4.2\EXAMPLES\01.HELLOWORLD\DEBUG\GLAVNI.OBJ

What did I do:
set include path paths (irllicht\include)
put the irrlicht.dll in Debug directory
change the irrlicht.lib for use in Borland C++ (through coff2omf.exe)
import new lib to project (Project->Add to project)

The code is like this:

//---------------------------------------------------------------------------
#include <vcl.h>
#include <irrlicht.h>
#pragma hdrstop
//---------------------------------------------------------------------------
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
//---------------------------------------------------------------------------
//*Bc.lib in the name means that this lib is converted with coff2omf.exe
#pragma comment(lib, "IrrlichtBC.lib")
#pragma argsused

int main(int argc, char* argv[])
{

IrrlichtDevice *device =
createDevice( video::EDT_OPENGL, dimension2d<s32>(1024, 768),
16,false, false, false, 0);

return 0;
}

What did I missed?

Note: this is not my first project for converting VC++ libs to Borland environment, but here I stucked...
rabehehbahreini
Posts: 11
Joined: Sat Mar 14, 2009 3:40 pm

Post by rabehehbahreini »

I have the same problem as you have. my teacher said that it is because of name manglings in the setting . but i could not solve this problem yet.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Are you sure that the comment-lib pragma is supported by this compiler? I'd try to link against the lib by different means.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

You should try to remove default parameters in CreateDevice definition,
or use something like:
typedef core::dimension2d<s32> dim_type; // by darseq, bcb compat
IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice(
video::E_DRIVER_TYPE deviceType = video::EDT_SOFTWARE,
const dim_type& windowSize = dim_type(640,480),............
See this topic:
http://irrlicht.sourceforge.net/phpBB2/ ... 31&start=0

For earlier Irrlicht version that was the trick, so I suppose that the same issue will work with Irr 1.5
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
rabehehbahreini
Posts: 11
Joined: Sat Mar 14, 2009 3:40 pm

Post by rabehehbahreini »

I have tried to compile this file but I received these errors :
declaration synatax error in irrmath.h
and many error in file scolor.h
how can i fix this problem?
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

BCC doesn't support some MS defined types.
You should predefine any functions in project options ->conditional defines.
See example below:

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=(double)fmodl;floorf=(float)floor;ceilf=(float)ceil;_DEBUG;fabsf=(float)fabs

I have not any spare time right now to try Irr 1.5, but you can add some additional types if it's necessary following Irr 1.4 example above.

Success!
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
Post Reply