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...
Borland C++ Builder
-
- Posts: 11
- Joined: Sat Mar 14, 2009 3:40 pm
You should try to remove default parameters in CreateDevice definition,
or use something like:
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
or use something like:
See this topic: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),............
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
-
- Posts: 11
- Joined: Sat Mar 14, 2009 3:40 pm
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!
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!