Thread: Need help with Direct3D

  1. #1
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Question Need help with Direct3D

    I just followed a tutorial from neXe. But when I compile I get the error:

    Info :Resource compiling C:\Dokument\Cpp\DirectX\dxtest01.rc
    Info :Linking C:\Dokument\Cpp\DirectX\dxtest01.exe
    Error:Error: Unresolved external 'Direct3DCreate8' referenced from module dxtest01.cpp

    Do you know what the problem is? I can post the code too if you want, but perhaps you can figure out what is wrong without it. I'm using Borland 5.0 with DX8 SDK.

    /Magos
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    I'm not sure how to do it with the Borland compiler, but have you included the correct libraries in your linker options?

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    How?

    I need to link 'dxguid.lib' and 'd3d8.lib'. But I have no idea how. I've gone through every menu and checked the help files several times, but I can't find it anywhere...
    How do you do this in Borland?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Unhappy Still need help, plz...

    Still need help, plz...
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  5. #5
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    the best i can tell you is look in the docs that came with the program...

    edit: or try searching www.google.com for linking libs in borland or something.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  6. #6
    V
    Guest
    You have Borland C++ 5.0? The version with the IDE?

    First, you need borland library version of the DirectX files (dxguid.lib and d3d8.lib). I do not know if they included Borland .LIB files in their distribution, otherwise, you should be able to use the command line to create them, like this:

    implib dxguid.lib dxguid.dll
    implib d3d8.lib d3d8.dll

    This assumes you're in the directory with the DLLs and that the \BIN\ subdirectory for BC5 is in the path.

    Once you have the LIBs, just drag and drop them onto the project window. Like the .RC, .CPP, etc files, you can put a library here and it will link to it.

  7. #7
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Still got problems

    I managed to include the dxguid.lib and d3d8.lib files (i think) by selecting add node in the project window.

    Unfortunately, a new error troubles me:

    Info :Linking C:\Dokument\Cpp\DirectX\dxtest01.exe
    Fatal:Fatal: Bad object file 'C:\Program\Mssdk\Lib\D3d8.lib' near file offset 185cb

    Is it something wrong with the actual lib-file? V, you said something about Borland library version.
    Are there different lib-files for different compilers? Are the ones that was included in DX8 SDK Borland versions???

    I also tried implib, but I don't have dxguid.dll. Is this good or bad?

    Any suggestions what I should do... except throw out the computer?

    /Magos
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  8. #8
    V
    Guest
    Yes, I had heard that Microsoft "forgot to include" Borland versions of the Direct3D .lib files. Those versions would work for MSVC, but not BC5.

    You can check the web, as I know many people have been distributing import libraries (baically, these are very small files that simply tell the program how to load the DLL, which is the "real" library).

    You have directX 8 installed, correct? You don't have a c:\windows\system\d3d8.dll file?

    I dunno about the DX8 SDK, as I'm still programming for the DX7 SDK, but in my "Lib" directory, there are libraries for MSVC, and then in another directory, "Lib\Borland", there are the BC5 versions. I have heard conflicting stories about whether verious versions of the SDK ship with Borland libraries or not.

    Your best bet is to do a file search on your PC for the DLLs (remember that unless you change your view options, windows will hide all .DLL files from you) and try to implib them. If you can't, try searching for borland directx8 import libraries. I'll try to search, too, as I just saw a site a few days ago with these...

  9. #9
    V
    Guest
    Here's how to get Borland libraries, FYI:

    http://www.geocities.com/foetsch/borlibs/

    You can ignore the part about static libraries, as I assume you will be using the dynamic libraries (.DLLs) and thus shouldn't need to worry about that.

  10. #10
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    I do have d3d8.dll, it is dxguid.dll that I miss.
    I do not have different compiler libraries under mssdk\lib, all library files lies in the same place... (No borland )

    Anyway, I checked the link you gave me, but the link to the file was currently down for maintainance... I'll have to go there later.

    Thanks a lot for the help!
    /Magos
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  11. #11
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Umm, link has been down for some time now...

    Umm, link has been down for some time now...

    When will it be up again? Someone who knows where to find these libraries somewhere else?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  12. #12
    Registered User
    Join Date
    Sep 2001
    Posts
    412

  13. #13
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Why, o' why?

    Why did Mircosoft forget to include these files? After downloading the lib files, the compiler complains it can't find uuid.lib. What file is that?
    Why must it be this hard to make a simple program with graphics?

    Perhaps I should return to good ol' Qbasic... All you needed to do was print SCREEN 7,0,1,0 and that's it...

    Sigh, I'll just hope they 'remember' these files in the next DX9 SDK...

    Thanks for all help!
    /Magos
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  14. #14
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    I have no clue; do you have a uuid.dll anywhere?

    Umm, search on Google, or try to find the DirectX 7 SDK, which DOES have Borland libs =]

  15. #15
    Registered User Esss's Avatar
    Join Date
    Aug 2001
    Posts
    133
    Try adding

    #include <initguid.h>

    before the Direct3D includes in one of your source files. You should not then need DXGUID.LIB.
    Ess
    Like a rat in a maze who says,
    "Watch me choose my own direction"
    Are you under the illusion
    The path is winding your way?
    - Rush

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why use Direct3D?
    By m3rk in forum Tech Board
    Replies: 42
    Last Post: 05-22-2009, 09:08 AM
  2. Need help with getting DirectX 9.0 initilization
    By DarkMortar in forum Windows Programming
    Replies: 7
    Last Post: 05-09-2006, 08:58 PM
  3. Creating a 2D GUI using Direct3D
    By codec in forum Game Programming
    Replies: 8
    Last Post: 09-23-2004, 11:57 AM
  4. Problem with Direct3D
    By frenchfry164 in forum Tech Board
    Replies: 1
    Last Post: 11-27-2003, 04:28 PM
  5. Direct3D vs. OpenGL
    By PorkyChop in forum Game Programming
    Replies: 22
    Last Post: 12-08-2002, 12:41 AM