direct 3d x debug library required?

This is a discussion on direct 3d x debug library required? within the Game Programming forums, part of the General Programming Boards category; I am using direct 3d to make a game and I need to use some functions that seem to be ...

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    731

    direct 3d x debug library required?

    I am using direct 3d to make a game and I need to use some functions that seem to be standard in the d3dx libraries. But for some reason I need to include the d3dx9d lib wich is a debug release. Than I need the d3dx9d.dll file wich is also debug but that doesn't even come with the standard user release of direct x.

    The functions I need are:

    D3DXMatrixLookAtLH(...)
    D3DXMatrixPerspectiveFovLH(...)

    and there are more but I don't need them at the time or found was around using them (probebly not the best thing to do for all of them).

    So is there a way around this or what do I need to do? I also heard you can't distrubute the d3dx9d.dll file but I only heard that from forums.

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    The debug versions and retail versions are release with every SDK. When you installed the SDK you should have chosen "Install retail and debug versions" The install will then put a control panel applet for DirectX and will let you select which DLL version to use and how much error reporting you want. Quite handy really.

    The debug versions though only differ in speed and algo's. The actual function names should not differ. Those two functions are most certainly a part of the D3DX retail library. Something else is causing the problem.

  3. #3
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    It is a linker error saying that the functions aren't in the library. I have all the d3dx standard libraries in it and I am using dev-c++. I have the full direct x 9 (octobor release) sdk installed.

    But has I said my direct x 9 (forgot name, the user one) was fully installed and I still don't have debug but that is no longer the point. BUT the retail and debug do come with the SDK.

    As you said the functions should be in retail releases of the libraries but they are not.

    EDIT: Also what about this control pannel you say?

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    I said the libraries should be in the dev release of the SDK. They are not part of the redist portion of DirectX.

  5. #5
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    Post a screenshot of your MSVC or .NET IDE link settings. You must link with d3dx9.lib. Also you should notice two folders. One says debug and one says retail or redist.

  6. #6
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    Well I am using dev-c++ so my linkers look like this:

    -ldsound -ldinput8 -ld3dx9 -ld3d9 -ld3dxof -ldxguid -ldxtrans

    the l before each one stands for lib. I am linking them directy from the sdk lib x86 folder.

    Also I have no folders for debug and retail, only x64 and x86 folders.


    The exact errors I get is:

    undefined reference to `D3DXMatrixLookAtLH@16'
    undefined reference to `D3DXMatrixPerspectiveFovLH@20'

  7. #7
    Registered User
    Join Date
    Aug 2003
    Posts
    1,209
    Did you install the DirectX devpak? Because the DirectX SDK released by MS doesnt work with dev cpp (as far as i know).
    STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.

  8. #8
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    as far as I know it is working just fine, just those 2 linker errors. The dev pak is sorta out of date. I just basicly replaced the header and lib files and it works fine. But I'm not sure about these linker errors.


    EDIT: I opened the retail d3dx9 file up in notepad and found maybe 5 entries of D3DXMatrixLookAtLH. So it does appear to be decleared so maybe it is dev-c++ now.
    Last edited by Rune Hunter; 10-30-2005 at 02:21 PM.

  9. #9
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    Well you can create those functions if you want. Make a function to create a look at matrix. The math you need is somewhere on this game programming board. I posted about it some time ago under something about my ongoing project XSpace. Do a search on posts started by me.

  10. #10
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    ok after I see if this new version of code::blocks works now. If it doesn't I'll do the search.

  11. #11
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    Ok after trying to use codeblocks I figured out that d3dx9.h or d3dx9.lib do not come with dev-c++ or codeblocks. But the rest of the files do. If I try to use my d3dx9.h file it throws a ton of errors.

    But I also get the same linker errors with code::blocks so it isn't just dev-cpp. I think I might have to make my own functions here.


    EDIT: I searched for hours and hours on this and it appears it is a lib error. I also didn't find anything on making your own D3DXMatrixLookAtLH function.

    I'm thinking on just using the debug dll and including it with my game.
    Last edited by Rune Hunter; 10-30-2005 at 04:17 PM.

  12. #12
    ---
    Join Date
    May 2004
    Posts
    1,379
    I tried it with dev-c++ and I had some strange side effects but no linker errors so what I did was download the free MS Visual C++ Toolkit 2003 and code::blocks. I also downloaded the Windows Platform SDK because the gcc version of the Windows SDK had problems using the MS compiler.
    btw: the debug libs and the retail libs are all in the same folder, eg /lib/x86/..
    d3dx9.h is going to be in the DirectX SDK include folder not with code::blocks or dev-c++

  13. #13
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    I see, so far it looks like C++ toolkit 2003 does work. I did have that but I forgot all about that. I also have the platform sdk already.

    thanks a ton!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. a library or API providing direct access to a running PE address space
    By renzokuken01 in forum Windows Programming
    Replies: 9
    Last Post: 05-24-2009, 02:40 PM
  2. Need help with audio library on DOS...
    By Marton79 in forum C Programming
    Replies: 10
    Last Post: 08-25-2006, 01:32 AM
  3. Startind Direct 3d in C#
    By Rune Hunter in forum Game Programming
    Replies: 0
    Last Post: 07-24-2005, 09:37 PM
  4. 3D Engines
    By Peter_D3T in forum C++ Programming
    Replies: 5
    Last Post: 06-22-2002, 04:59 PM
  5. Ask about Debug Assert Failed
    By ooosawaddee3 in forum C++ Programming
    Replies: 0
    Last Post: 04-25-2002, 12:07 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21