Sign in to follow this  
nlraley

Borland Builder 6 and DirectX - Problem Using Libraries

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Quote:
Original post by nlraley
Because the company I work for doesn't want to spend resources to redevelop the applications for a completely different development platform.

Sad for them.

In business, you need to evolve or die.

This is especially true in the software industry, where yesterday's industry standard is today's byword.

Share this post


Link to post
Share on other sites
They want it in directx. Its no biggie. It turned out it was the order which I was referencing the includes. I have it up and running now and am trying to figure out how to load the textures, which I have a discussion going on in another topic.

Thanks for the help guys.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this