This is a brief guide to how you can use the DirectX SDK in BCB.
I'm here to assume that your BCB installation path is: C:\borland\cbuilder\,directx SDK in C:\dx5sdk\
Set up Borland C + + Builder
#include
This is a problem for many people, Borland BCB's \include path provides the header file for DirectX, and if you just add c:\dx5sdk\sdk\inc\ to BCB's include path, it does the following:
Find C:\Borland\Cbuilder\Include\ Path
Find Ddraw.h header file, use it;
Besides what he found was DirectX3 's head, there was no harm, but it was not a good thing.
To avoid BCB, I recommend that you simply copy the files under the \inc path of the DirectX SDK to the BCB \include path and overwrite the original DirectX header file, and believe me, this is the best of all solutions.
Library files
There may be something wrong with the library files that are being used by the Borland compiler that is released with DirectX, I suggest you download this file here, unzip it under the BCB \lib path, and all ok!
About Engineering
Do not use the wrong template to create a project, to create a program, you may soon understand what is called the "miserable World", the sensible solution is to do the following four simple steps:
Create a console program (console application);
to the Options | The Project menu selects the linker page and then sets the console to the Win32 GUI,
Write WinMain () functions and WinProc () functions:
Write the other parts.
Here's an example.
Is it over?
Unfortunately, no! BCB uses an old way to handle "define", so add the following code to the define part of each DIRCETX application:
#if defined (__borlandc__) && defined (__win32__)
#define _win32
#endif
It's about the same now.
Other issues
If there is a problem at compile time, try adding the following code:
#define WIN32
#define WIN95