Borland C++ Builder 6

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Borland C++ Builder 6

Post by soconne »

Has anyone gotten Irrlicht to work with Borland C++ Builder ??
I managed to edit Irrlicht.h to have it compile without any errors, and I used the coff2omf.exe utility to convert Irrlicht.lib over to Borland's format, but when I try and run it, I get the following message

[Linker Error] Unresolved external 'irr::createDevice(irr::video::EDriverType, const irr::core::dimension2d<int>&, unsigned int, bool, bool, irr::IEventReceiver *, const wchar_t *)' referenced from C:\DOCUMENTS AND SETTINGS\JAMES\MY DOCUMENTS\NEW FOLDER\UNIT1.OBJ

This has got have something to do with the .lib file I'm guessing.

Anybody have any ideas??

I'd really like to see Irrlicht work with Borland C++ Builder, because it is so much easier to build GUI applications and make things like Level Editors, Character Editors, ect..... cause MFC and Visual C++ are a pain to use when it comes to forms and dialogs.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

did you tell the borland compiler/linker to link with the .lib file?
Guest

Post by Guest »

yes, i added

#pragma comment(lib, "Irrlicht.lib")

at the top of my main.cpp file right under the include statements.
Why, have you gotten it to work before with Borland?


Oh, and I'm sure people have said this a thousands time in the past, but I'm new here, so I'll say it again..... Your engine freakin ROCKS !!!!!!
alexem
Posts: 35
Joined: Sun Feb 29, 2004 4:55 pm

Post by alexem »

why don't you try DevCpp. It's free.
I finaly mannaged to make it work with irrlicht :mrgreen:
Yours sencerely,
Alexander Milanoff
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Post by soconne »

I want to use Borland C++ Builder because I'm working on making a terrain/world level editor with texture splatting, landscape painting, terrain vertex manipulation, ect..... but right now its written with Borland C++ and OpenGL. I wanted to use Irrlicht so that I could incoporate all the features of Irrlicht into the editor with ease, so I wouldn't have to write them myself; such as model loading, zip file usage and a bunch of other stuff. Plus Borland C++ Builder is just like Visual Basic in terms of window and form creation, but you use C++, its great!!

So does anybody have a solution to my problem or have gotten Irrlicht to work with Borland ??
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

Post by Gorgon Zola »

hi soconne

borland c++builders link lib format is incompatible to msvc lib.
either try to compile irrlicht with c++builder or generate a new irrlicht.lib with the implib tool

Code: Select all

CBuilder6\bin\implib.exe irrlicht.lib \irrlicht\original\irrlicht.lib
this takes the irrlicht original lib from \irrlicht\original\irrlicht.lib and generates a lib that can be used with borland compilers

good luck
tom

edit: sorry, you have to build the irrlicht.lib with the irrlicht.dll of course :wink:
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Post by soconne »

hey thanks for the tip tom. i tried what you said and created a new irrlicht.lib file, but i still got the same error, saying unresolved external error the createDevice function. I still do not understand why it is saying this, I know the code is in the DLL file and I'm guessing Borland is just not seeing it in the LIB file.

Did you ever get it to work?
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

Post by Gorgon Zola »

actually i have dumped c++builder because of the incompatible lib format and bought me an acamedic version of visual studio .net, almost every open source project has some compiled code for msvc, but none for borland :cry:

anyway, here's a source where you can learn more about borland using msvc dll
http://www.bcbdev.com/articles/vcdll.htm

i would try to add the irrlicht.lib to the project using the
" Project | Add to Project "menu, because i don't trust c++builder with that pragma comment

cheers
tom
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Post by soconne »

I give up. I tried everything in that article and for some reason, when i use the borland tools to extract a .def file from the irrlicht.dll, i get the following

LIBRARY IRRLICHT.DLL

EXPORTS
?createDevice@irr@@YAPAVIrrlichtDevice@1@W4EDriverType@video@1@ABV?$dimension2d@H@core@1@I_N2PAVIEventReceiver@1@PBG@Z @1 ; ?createDevice@irr@@YAPAVIrrlichtDevice@1@W4EDriverType@video@1@ABV?$dimension2d@H@core@1@I_N2PAVIEventReceiver@1@PBG@Z


that site then says to change the symbols so the naming conventions agree with Borland, so I create this

LIBRARY IRRLICHT.DLL

EXPORTS

_createDevice =
createDevice@irr@@YAPAVIrrlichtDevice@1@W4EDriverType@video@1@ABV?$dimension2d@H@core@1@I_N2PAVIEventReceiver@1@PBG@Z @1

And then when I finish it and try to create a .lib file from this def file using the 'implib' utility I get errors saying

Borland Implib Version 3.0.22 Copyright (c) 1991, 2000 Inprise Corporatio
Name: 'irrlicht' Ext: '.dll' Base: 0x00000000
Name: 'IRRLICHT.DLL' Ext: '.dll' Base: 0x00000000
Error irrlicht.def(4): Invalid character in .DEF file

Oh well, I'll keep trying :-)
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Post by soconne »

well I'm giving just recompling the engine with Borland C++ Builder one more try. I ran across errors but fixed them by reading a previous post, but now I'm getting the following error and cannot figure out how the heck to fix it.

here it is:

[C++ Error] Irrlicht.h(262): E2108 Improper use of typedef 'video::EDriverType'

Clicking on this brings me to Irrlicht.h to the line

IRRLICHT_API IrrlichtDevice* createDevice(
video::EDriverType deviceType = video::EDT_SOFTWARE,
const core::dimension2d<s32>& windowSize = core::dimension2d<s32>(640,480),
u32 bits = 16,
bool fullscreen = false,
bool stencilbuffer=false,
IEventReceiver* receiver = 0,
const wchar_t* sdk_version_do_not_use = IRRLICHT_SDK_VERSION);



And I cannot figure out how to solve it. I looked up the error in forums on th enet, and it said the error occurs when you place a typedef where a variable is suppose to go, but I do not see how that applies here.

Can anybody help? :(
Old Chap

Borland C++ Builder 6

Post by Old Chap »

Look through the Beginners Help. It seems to me that I answered this question about two or three months ago. You'll meet a lot of troubles using Borland compiler. I advise you to waste no time and start with another one.
Most commonly used libraries and apps are developed and built (under win32) with MSVC++. Borland developping systems are used in enterprise solutions for the most part. I think that the Borland's free compiler (and Builder as well) is not the best choice for game development.
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Post by soconne »

Hey Old Chap,

I found your older post

http://irrlicht.sourceforge.net/phpBB2/ ... ht=borland

Did you ever get it to compile under Borland? If so, can I get the compiled .lib file from you?
Old Chap

Post by Old Chap »

Hi, soconne

I'm using Borland C++ Builder as my main tool for development enterprise apps (databases, networking etc.). And of course, I tried to build some free libraries with Borland compiler (Irrlicht, OGRE). Without success. Yes, I think it's possible to re-build Irrlicht with Borland C++ Builder. But it'll take a lot of time to adapt the source code written for MSVC for using with Borland compilers. I don't want to waste my time. And now I'm using MSVC for coding games.

Sorry, :cry: I didn't help you.
Post Reply