Menu

Problem with DirectX

2005-09-01
2012-09-26
  • Nobody/Anonymous

    Every time I try to compile a DirectX program with DevC++, I get the error 'Linker Error: Unreferenced (I don't recall the word) to D3D Create9@4'

     
    • Wayne Keen

      Wayne Keen - 2005-09-03

      PS: I can't copy and paste the compile log

      Why not? The right mouse button brings up the copy menu.

      "I included the library libddraw.a, so it must be there somewhere."

      You have no idea how many times I have been told that. Quite a few of them had issues with how they were doing the link. The log would tell us that story.

      Wayne

       
    • Nobody/Anonymous

      Please post your basic 3 (see the FAQ thread in this forum if you don't know what that is)

      Also, in that same thread is a section on the compile log, including headers, and linking libraries. You should look at that. The error message is indicative of you not linking a required library.

      Also, NEVER post an error message from memory. Copy and paste your compile log. If you do not have the right computer in front of you, don't post until you do.

      Wayne

       
    • Nobody/Anonymous

      First of all, I included the correct library and header, (shown in the book 'beginning game programming'), I am using windows ME, and DevC++ 4.9.9.2, and I am using a different computer to connect to the internet than the one I use for Programming.

       
    • Wayne Keen

      Wayne Keen - 2005-09-01

      "First of all, I included the correct library and header"

      Thats not what your error message shows. That is why it is vital to see your compile log. It shows us exactly what got linked.

      Copy and paste it to a text file, and sneaker net it if you have to.

      Wayne

       
    • Nobody/Anonymous

      s

       
    • Nobody/Anonymous

      I don't even think that Dev-C++ supports DirectX. The only headers available are d3d9.h and the libraries when opened by notepad don't have any function names in them (all it says is text). I get the same error too with directdraw (I gave it the header myself) and that error seems to occur when a function doesn't exist. I included the library libddraw.a, so it must be there somewhere.

      My version is 4.9.9.1 and my OS is Windows XP.
      PS: I can't copy and paste the compile log

       
    • Nobody/Anonymous

      The solution to this certain problem:

      " [Linker error] undefined reference to `Direct3DCreate9@4' "

      is to link the library via accessing the project options (right click in project/class browser), going to parameters and linking the d3d9 library by typing "-ld3d9" in the linker box.

      It should work if you have the d3d9 file in your dev-cpp\lib folder...

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.