Thread: D3DXCreateFont linker error

  1. #1
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005

    D3DXCreateFont linker error

    I have recently started using DirectX. I am using Dev-C++ on Windows XP and I have the headers and libraries needed for DirectX programming. I made a project in Dev, included and linked the needed libraries and headers, made a window and added D3DXCreateFont function in my window procedure under WM_CREATE:. The only error that comes up, is this:
      [Linker error] undefined reference to `D3DXCreateFontA@48'
    I have linked the correct libary(which is d3dx9.lib), and checked it out on MSDN. What could be causing this linker error? Thanks.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."

  2. #2
    Registered User
    Join Date
    Jul 2005
    I don't think that Dev-C++ (MinGW) implements d3dx9.lib, probably licensing/copyright issues. I haven't tried converting d3dx9.lib to libd3dx9.a (MinGW naming convention) but it might well be possible. Actually that would translate to -ld3dx9 in the Project Options / Parameters / Linker box. Try -ld3dx9d and that will link the debug version of the lib which I'm sure is implemented in Dev-C++ That first character is a lower case L for those who might not know it.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  2. Crazy errors caused by class, never seen before..
    By Shamino in forum C++ Programming
    Replies: 2
    Last Post: 06-10-2007, 11:54 AM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  4. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 04:49 AM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 05:27 AM