Thread: Directx9 linker dependancies

  1. #1
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101

    Directx9 linker dependancies

    Hello,

    I'm trying to compile this window for a starter directx9.0 project but I don't know what additional dependencies. I put d3d9.lib, d3dx9.lib, and winmm.lib in the additional dependencies in the linker input but there's something else and I have no idea what it is. Because I'm just getting a fatal error <d3d9.h> not found etc.

    Does any one know how to set up the properties??

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    That's not a linker dependency. It's telling you that it can't find the include file, probably because you must tell your compiler to look in the DX9 SDK include directory for headers.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    Ok...what does all that mean??

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Means "Go to Options -> Configure -> Directories -> Include Directories" and add the directory in the DX9 SDK that contains all the include files.

    Menu path may be inaccurate.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    Almost there...now I just have errros like:

    Error 1 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [19]' to 'LPCWSTR' c:\users\john\documents\visual studio 2005\projects\firstwindow\firstwindow\d3d9.cpp 84


    like I said in C/C++ I put the include path...

    in Linker/Input I put d3d9.lib, d3dx9.lib, winmm.lib


    Any ideas??

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    You have written your program using narrow strings, but you're following the default setting of compiling as Unicode. Either update your program to be Unicode-ready (the preferred option) or change your program options to not use Unicode (the faster option).
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #7
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    Sorry I really appreciate the help....one last question though...is d3d9.lib deprecated ?? for d3dx9.lib???

  8. #8
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Not that I know. As far as I know, d3d9.lib contains the COM stubs like D3DCreate9() or whatever the function is called, whereas d3dx9.lib contains the utility library (everything starting with D3DX).
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  9. #9
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    yeah cause I included d3d9.lib, d3dx9.lib, winmm.lib......and the build is saying that it can't find them...

  10. #10
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    did I mention I'm starting to get super ........ed cause this is just to show a blank blue screen

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    The can't find issue is pretty much the same as the include file issue, just with import library paths.

    But if it shows a blank blue screen, it seems you've got it to run at last. Just not to draw anything.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #12
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    I quit...jesus...I've been trying to set this thing up for 3 hours now.......I got the path set to C:\Program Files\Microsoft DirectX SDK (August 2007)\Lib\x86" for the libs...I include those three libs...the path to the headers is straight...the unicode is not set....I have no idea what the problem is.....

  13. #13
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    The build cannot find the libraries?

    Like

    fatal error LNK1104: cannot open file 'xxx.lib'

    ?

  14. #14
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    Ok.. there's this guy and here's a 'tard' he went and built a win32 console app not a win32 app.....so thus all is libraries etc didn't work etc....and he is sorry for bothering everyone with his ignorance.

  15. #15
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    There are several sites that will show you how to setup DirectX for use with various compilers. If that doesn't work go to amazon and buy a book on it.

    D3DX9 is the D3DX library for Direct3D 9.0c. D3D9 is Direct3D 9 and contains all the COM interfaces and so forth.

    Nothing in any current version of Direct3D is deprecated. The only thing that has been 'truly' deprecated in DirectX itself is DirectShow - it is now part of the platform SDK. I'm not sure if DirectMusic has also been deprecated or not.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linker problem... no idea
    By cyreon in forum C Programming
    Replies: 2
    Last Post: 04-03-2009, 02:53 PM
  2. linker
    By George2 in forum C++ Programming
    Replies: 6
    Last Post: 02-23-2008, 01:25 AM
  3. Linker errors in VC++ 2005
    By C+/- in forum C++ Programming
    Replies: 0
    Last Post: 05-18-2007, 07:42 AM
  4. Linker errors when compiling
    By The Wazaa in forum C++ Programming
    Replies: 4
    Last Post: 10-07-2006, 12:55 PM
  5. Linker errors with Visual C++
    By codegirl in forum C++ Programming
    Replies: 4
    Last Post: 09-11-2003, 09:20 AM