Clootie graphics pages - Articles

 How to compile MS DirectX 8.x SDK samples in C++Builder
  
Contents
  • Introduction
  • What additional files do you need?
  • Actions

  • Introduction

    This page describes which additional files you will need and actions you should take to compile samples from MS DirectX 8.x SDK's in Borland C++Builder. All these actions were tested in version 5.0 of C++Builder.


    What additional files do you need?

    1. C++Builder library pack
      [ CBuilder_D3Dxx_libs.zip: Direct3D 8.0b version / Direct3D 8.1 version / Direct3D 9.0 version ]
    2. DLL needed for both Delphi and C++ Builder, to use D3DX8 functionality
      [ Clootie_DXxx_dlls.zip: for DirectX 8.0b / for DirectX 8.1 / for DirectX 9.0 ]
      It's recommended to place these DLLs in Windows system directory.
    3. Original DirectX SDK include files and samples ;-)
      [ can be downloaded here ]


    Actions

    Here we go:
    1. Launch "Visual C++ Project Convertion Utility" under Tools menu. Point this utility to convert DSP files from the wanted sample. After proceeding you should choose "Win32 Release" project to convert. After convertion you will see a certain number of warnings - don't bother scratching your head - everything is fine.
    2. Open project file (BPR) and under 'Project\Options\"Directories / Conditionals"' tab you should add:
      in "Include Path": path to MS SDK include files (default path is "c:\dxsdk\include")
      in "Library Path": path to DirectX C++Builder library pack from this site
      in "Conditional Defines": "cosf=(float)cos;sinf=(float)sin;acosf=(float)acos;asinf=(float)asin;tanf=(float)tan; atanf=(float)atan;sqrtf=(float)sqrt"
    3. Push Compile button!


    Please inform me of any grammar or general errors, contained on these pages, Alexey Barkovoy
    Last updated: 28-Feb-2003

    Hosted by uCoz