DirectX 8 Borland LIBs Download Page

As a user of Borland C++Builder, you are aware of the fact that, unlike the DirectX 7 SDK, the DirectX 8 SDK does not contain Borland-compatible (OMF format) LIB files. However, it is still perfectly possible to use DirectX with C++Builder. You can either use the ImpLib utility as described in this article to create the import libraries yourself (but not the static libraries), or you can download a complete set of LIB files, including the static libraries:

borland_dx8_libs.zip (mirrored on CodeCentral: borland_dx8_libs.zip) (640 KB)

And what’s best is that this archive is the first one to include Borland versions of the D3DX static libraries. The following files are included:

amstrmid.lib
c_dinput.lib	added Feb. 24, 2001
d3d8.lib
d3dx.lib
d3dx8.lib       updated Apr. 15, 2001
d3dx8d.lib      updated Apr. 15, 2001
d3dxd.lib
d3dxof.lib
ddraw.lib
dinput.lib	updated Feb. 10, 2001
dinput8.lib	updated Feb. 10, 2001
dmoguids.lib
dplayx.lib
dpnaddr.lib
dpnet.lib
dpnlobby.lib
dpvoice.lib
dsetup.lib
dsound.lib
dxerr8.lib	added Jan. 28, 2001
dxguid.lib
dxtrans.lib     added May 5, 2001
ksproxy.lib
ksuser.lib
msdmo.lib
qedit.lib       added May 5, 2001
quartz.lib
strmiids.lib

Note: The replacements for the D3DX static libraries (d3dx.lib, d3dxd.lib, and d3dx8.lib) are import libraries for wrapper DLLs (d3dxbor.dll, d3dxdbor.dll, and d3dx8bor.dll, respectively). The wrapper DLLs were created using Visual C++ and are included in this archive. If you link to d3dx.lib, d3dxd.lib, or d3dx8.lib, you must ship the corresponding DLLs with your application. This is also true for dxerr8.lib, which imports from dxerr8bor.dll.

Note: A replacement for the D3DX 8 static debug library (d3dx8dt.lib) is not included. Use d3dx8d.lib, the import library for the D3DX 8 debug DLL, instead. The DLL is part of the DirectX 8 SDK.

Note: dinput.lib and dinput8.lib do not contain the “c_dfDI…” global instances of the DIDATAFORMAT structure. To use these structures, add c_dinput.cpp to your project or link to c_dinput.lib.

You are free to use the LIBs and DLLs in the archive (borland_dx8_libs.zip) to create your DirectX applications. You may redistribute the archive as long as you do not modify its contents or provide misleading information about its origin.

FAQ Section

How can I distribute applications that use the D3DX wrapper DLLs?

When you’re using d3dx8.lib (D3DX 8 retail), ship d3dx8bor.dll with your application. When you’re using d3dx.lib (D3DX 7 retail) or d3dxd.lib (D3DX 7 debug), ship d3dxbor.dll or d3dxdbor.dll, respectively. When you’re using dxerr8.lib, ship dxerr8bor.dll. At runtime, the DLL(s) must be either in the same folder as the application’s executable file or in the windows or windowssystem folder.

Note: d3dx8d.lib (D3DX 8 debug) imports from d3dx8d.dll, which is part of the DirectX 8 SDK and must not be distributed with your application.

Do you have wrapper DLLs for the version 7 D3DX libraries?

The files d3dxbor.dll and d3dxdbor.dll in the archive are for Direct3D 7. The corresponding import libraries are d3dx.lib and d3dxd.lib.

Do you have LIBs for DirectX versions 8.0b, 8.1, and 9.0?

I don’t, but Alexey Barkovoy offers LIBs for Direct3D 8.0, 8.0b, 8.1, and DirectX 9.0 on his site at http://clootie.narod.ru/cbuilder/index.html.

I get an unresolved external error when I try to use dxerr8.lib. What can I do?

Include dxerr8.h as extern "C" to solve this problem:

extern "C" {
#include <dxerr8.h>
};

I need strmbase.lib for my DirectShow application. Where can I get it?

You can download the file strmbase.lib from here: strmbase.zip (152 KB)

If one of your projects requires strmbasd.lib, you can safely use strmbase.lib instead. The only difference between these two files is that strmbasd.lib contains debug information, which isn’t really required. However, strmbasd.lib is 2 MB in size, therefore I did not upload it.

You can create strmbasd.lib (as well as strmbase.lib) by building the baseclasses project in the samplesmultimediadirectshowbaseclasses folder of the DirectX 8 SDK. Rename the resulting baseclasses.lib to strmbase.lib (release settings) or to strmbasd.lib (debug settings). To convert the Visual C++ project file baseclasses.dsw to a C++Builder project, use the vctobpr.exe utility that comes with C++Builder.

Before attempting a build, you should overwrite the old DirectShow header files in the $(BCB)include folder with the new headers from the mssdkinclude folder and apply the following changes to the source files:

  1. wxutil.h, line 381:
    change #ifdef _X86_ to #if defined(_X86_) && !defined(__BORLANDC__)
    Reason: BCB doesn’t support __asm in inline functions. Instead of removing the inline keyword, the new #if statement compiles a straight C++ inline function.
  2. cprop.cpp, line 119:
    add a reinterpret_cast<DLGPROC> so that the function call looks like this:

    GetDialogSize(
        m_DialogId,
        reinterpret_cast<DLGPROC>(DialogProc),
        0L,
        &pPageInfo->size);
  3. cprop.cpp, line 204:
    add a reinterpret_cast<DLGPROC> so that the function call looks like this:

    m_hwnd = CreateDialogParam(g_hInst,
                               MAKEINTRESOURCE(m_DialogId),
                               hwndParent,
                               reinterpret_cast<DLGPROC>(DialogProc),
                               (LPARAM) this);
  4. wxutil.cpp, line 21:
    change #ifndef _X86_ to #if !defined(_X86_) || defined(__BORLANDC__)

In addition, when building strmbasd.lib (debug settings), set the LIB’s page size to 0x0040 in “Project | Options”, “TLib” tab.

For more information on building Visual C++ projects with C++Builder, please refer to the Articles page.

Advertisement

Leave a Reply

Your email address will not be published. Required fields are marked *

Python and C++, GNU/Linux, computer stuff…