Sidetracked - Borland C++ Part 2

Published August 20, 2007
Advertisement
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 :)

Previous Entry Sidetracked - Borland C++
Next Entry Ageia PhysX
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement