• Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Sidetracked - Borland C++ Part 2

Sign in to follow this  


Jan 30, 2007

Support for Borland C++ has been completed after a few frustrating problems:

1. Borland doesn't like #pragma once in the headers. I had to add #ifndef HEADER_H #define HEADER_H statements to the top of every header file. This took about a day.

2. Getting all of the external image libraries compiled under Borland was a bit of a pain since I didn't write that code. Libraries like DirectX and Newton needed to be converted into another format.

3. It took about 4 days to get the library compiling under Borland. Once it did, as soon as I accessed anything from the DLL it would crash. There was a problem in a constructor in one of my classes but it wouldn't show me where. This was a huge problem. To solve this made a copy of everything and started with a DLL that only contained the main engine class. It ran fine. I then started adding in the rest of the engine and retesting to see when it would crash. This took a couple of days, since the more I added the longer the compile times became. Borland also doesn't work well with precompiled headers so a full build would take up to 5 minutes. I finally narowed it down to a divide by 0 error in the HDR class. For some reason VC never picked this up. I went back to my original version of the source, fixed that and it worked great. I also created a small VCL app that renders an object in the form to test the engine.

Now that I have PR 6.8 compiling under Borland I'll have to apply those changes to the PR7 codebase later. Windiff will come in handy :)

Sign in to follow this  


Recommended Comments

There are no comments to display.

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

  • Advertisement