I am starting to learn DirectX since I want to make games.
I have been able to do a lot so far, but with the compiler I use (The free borland one version 5.5,) I cannot seem to use the DXUT functions.
When I try to define with DXUT.h included, I get a LOT of errors from various include files that it references. Without that definition, my test program will compile fine.

I don't know if I'm doing something wrong or if the compiler just can't work with it.

Here is the error output I get when I try to compile it:
Code:
bcc32 -WU c:\prog\directx\test.cpp

Error E2303 c:\Borland\Bcc55\include\d3dx10core.h 51: Type name expected
Error E2303 c:\Borland\Bcc55\include\d3dx10core.h 57: Type name expected
Error E2147 c:\Borland\Bcc55\include\d3dx10core.h 65: 'ID3D10Device' cannot star
t a parameter declaration
Error E2303 c:\Borland\Bcc55\include\d3dx10core.h 115: Type name expected
Error E2139 c:\Borland\Bcc55\include\d3dx10core.h 115: Declaration missing ;
Error E2293 c:\Borland\Bcc55\include\d3dx10core.h 172: ) expected
Error E2147 c:\Borland\Bcc55\include\d3dx10core.h 182: 'ID3D10Device' cannot sta
rt a parameter declaration
Error E2293 c:\Borland\Bcc55\include\d3dx10core.h 323: ) expected
Error E2303 c:\Borland\Bcc55\include\d3dx10core.h 330: Type name expected
Error E2139 c:\Borland\Bcc55\include\d3dx10core.h 342: Declaration missing ;
Error E2040 c:\Borland\Bcc55\include\d3dx10core.h 349: Declaration terminated in
correctly
Error E2190 c:\Borland\Bcc55\include\d3dx10core.h 349: Unexpected }
Error E2190 c:\Borland\Bcc55\include\d3dx10core.h 349: Unexpected }
Error E2147 c:\Borland\Bcc55\include\d3dx10core.h 375: 'ID3D10Device' cannot sta
rt a parameter declaration
Error E2147 c:\Borland\Bcc55\include\d3dx10core.h 390: 'ID3D10Device' cannot sta
rt a parameter declaration
Error E2147 c:\Borland\Bcc55\include\d3dx10core.h 412: 'ID3D10Device' cannot sta
rt a parameter declaration
Error E2147 c:\Borland\Bcc55\include\d3dx10core.h 418: 'ID3D10Device' cannot sta
rt a parameter declaration
Error E2147 c:\Borland\Bcc55\include\d3dx10core.h 428: 'ID3D10Device' cannot sta
rt a parameter declaration
Error E2303 c:\Borland\Bcc55\include\d3dx10tex.h 220: Type name expected
Error E2139 c:\Borland\Bcc55\include\d3dx10tex.h 220: Declaration missing ;
Error E2303 c:\Borland\Bcc55\include\d3dx10tex.h 283: Type name expected
Error E2139 c:\Borland\Bcc55\include\d3dx10tex.h 283: Declaration missing ;
Error E2451 c:\Borland\Bcc55\include\d3dx10tex.h 300: Undefined symbol 'Usage' i
n function D3DX10_IMAGE_LOAD_INFO::D3DX10_IMAGE_LOAD_INFO()
Error E2314 c:\Borland\Bcc55\include\d3dx10tex.h 300: Call of nonfunction in fun
ction D3DX10_IMAGE_LOAD_INFO::D3DX10_IMAGE_LOAD_INFO()
Error E2147 c:\Borland\Bcc55\include\d3dx10tex.h 441: 'ID3D10Device' cannot star
t a parameter declaration
Error E2228 c:\Borland\Bcc55\include\d3dx10tex.h 441: Too many error or warning
messages
*** 26 errors in Compile ***
I am not really familiar with DirectX, but could I be leaving out a lib it needs to work?
Here is the program I am trying to compile. I removed everything but the basics for this test:
Code:
#include <windows.h>
#include <windowsx.h>
#include <directx/d3d9.h>
#include <directx/dxut.h>

#pragma comment (lib, "d3d9.lib")


LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);



int WINAPI wmain(HINSTANCE hInstance,
                   HINSTANCE hPrevInstance,
                   LPSTR lpCmdLine,
                   int nCmdShow)
{
    HWND hWnd;
    WNDCLASSEX wc;

    ZeroMemory(&wc, sizeof(WNDCLASSEX));

    wc.cbSize = sizeof(WNDCLASSEX);
    wc.style = CS_HREDRAW | CS_VREDRAW;
    wc.lpfnWndProc = (WNDPROC)WindowProc;
    wc.hInstance = hInstance;
    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
    wc.lpszClassName = L"WindowClass";

    RegisterClassEx(&wc);

    hWnd = CreateWindowEx(NULL,
                          L"WindowClass",
                          L"A Basic Test",
                          WS_OVERLAPPEDWINDOW,
                          300, 300,
                          640, 480,
                          NULL,
                          NULL,
                          hInstance,
                          NULL);

    ShowWindow(hWnd, nCmdShow);

    MSG msg;

    while(TRUE)
    {
        DWORD starting_point = GetTickCount();

        if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
            if (msg.message == WM_QUIT)
                break;

            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }

    
    }



    return msg.wParam;
}



LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch(message)
    {
        case WM_DESTROY:
            {
                PostQuitMessage(0);
                return 0;
            } break;
    }

    return DefWindowProc (hWnd, message, wParam, lParam);
}
It compiles and links fine if I leave out the definition of dxut.h/
Any help would be really great, as I am stumped.
Thanks!