Borland Builder 6 and DirectX - Problem Using Libraries

Started by
11 comments, last by nlraley 13 years, 6 months ago
I visited the clooty site and fetched all the files I believe I needed to grab.

I have the dll's in the directory of my program and all of the libraries in my Borland library directory.

However, when I try to call the function D3DXCreateTextureFromFile I keep getting a called to undefined function message.

Any ideas what I'm missing?
Advertisement
I don't use Borland, but I would assume you are not referencing them, so the compiler doesn't know to look at the DLL. Although I am not 100% sure :-\
What is the exact error? It sounds like you're not linking to the library files (In visual studio that's the .lib files). Also, why are you using Borland builder? Visual Studio 2010 Express is free, and is much better. And it's officially supported with the DirectX SDK, unlike Borland builder...
Actually I think I have figured it out.

I included the .h files.

Apparently using the
#include "d3d9.h"
along with
#include "d3dx9.h"
was my issue.

I had tried just using the d3d9.h without the d3dx9.h and that didn't help, but the only thing I hadn't tried was using the d3dx9.h by itself.

I found a msdn article on the function and saw d3dx 9 functions and figured it was a function of d3dx9 instead of the d3d9. What was weird was including both toss up some linker error with it not being able to find some very long d3dxd9d3 or something like that. Using the d3dx9.h by itself fixed this.
And yes, I would be using Visual Studio if I had the option, but unfortunately my company hasn't moved to that yet and thus I am not only stuck with Borland but a heavily outdated version. I love VS and would jump into it in a heart beat if I could. I had to move to dx9 to support the png format in Borland, which is why I was messing with this instead of an earlier version of DX.

Another quick question, I am basically creating this for displaying a map. I have several tiles saved as PNGs which I am creating an individual Texture for. I need to load these onto a single texture, which will act as a backbuffer or backdrop, which I will then swap out with the main texture.

Is my logic with this right?

Use the CreateTextureFromFile for each of my PNG files, which is saved as a MapTile Object with their own D3D Texture.

After these are loaded I can blt them to the Backdrop surface/texture at the appropriate coordinates? Then swap it with the Primary Texture? Similar to what I would have done with 7? Or is there an easier method?

And when would I release the MapTile textures? After I have loaded them into the Backdrop?
IIRC, Borland uses a different library format than VS and the last available libraries for DX with Borland were DX8.

I'm not recommending any of these hits as some look like DLL sharing sites but I don't think you are going to be in luck finding anything for beyond DX8.

I was a Borland boy in the day, so I know your pain. Unless you are making heavy use of the RAD tools for GUI design (in which case C# Express) or have a Pro version of Borland at work with team or profiling features (in which case investigate free third party solutions), if it is politically safe to do so it might be worth pointing out that you can use VS Express commercially and that the compiler is literally years ahead of BCC.

I still sometimes think of the VCL in the small hours of a sleepless night and shudder. I appreciate it was a cost-effective re-use of the Pascal Win32 wrapper but far better solutions exist today.
Problem is we have 2 mainstream applications that are approximately around 1 million lines of code a piece that are both developed in Borland Builder 6, hence the reason they haven't moved over yet. They don't want to redevelop each of these from the ground up to get it in a new environment, thus I am stuck where I am.

http://www.clootie.ru/cbuilder/index.htm

Is where I found all the stuff I needed for DirectX 9 at.

Now I'm digging in to finding the best method in which to display these images.
Okay, makes sense and glad to see there are some D3D9 libs available for Borland.
As a side note, BCB6 is over 8 years old.

It isn't even developed or owned by Borland any more.

I recall that they had issues where you must import all libraries to their component library format, but this has almost certainly been addressed over the years.

Any reason you are sticking with such an old version?
Because the company I work for doesn't want to spend resources to redevelop the applications for a completely different development platform.

This topic is closed to new replies.

Advertisement