#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    2
    Rep Power
    0

    Dev-C++ / DirectX 8.1


    I tried to compile a small DirectX program.
    It only uses DDraw.

    But I get this message:
    [Linker error] undefined reference to `DirectDrawCreateEx@16'

    I set all DX SDK pathes correctly (or at least the same way than VC++) and I included dxguid.lib and ddraw.lib (project options-parameters-libraries). I also tried the other libraries, but without success (when I add to much, it won't link but give me a message, everything's okay - but no .exe!).

    What can I do?

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    DirectDrawCreateEx is part of the IDirectDrawFactory interface, no? If I understood the docs correctly, this is deprecated today in favor of the IDirectDraw interface.

    You need to get DirectX7 headers to compile this program then.

    (not 100% sure on that)
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    2
    Rep Power
    0
    It is DX 7, but with Visual C++ and DirectX 8.1 SDK it worked without any problems.

    Does anyone know how to configure Dev-C++ correctly for DirectX?
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    2
    Rep Power
    0

    Same Problem


    I'm experencing the same Problem. And I know where it comes from. The Library has a symbol DirectDrawCreateEx but your code is compiled with the symbol name DirectDrawCreateEx@16. What does that @16 mean? Does anybody know? Maybe thats the solution!!
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    You should use the DevPAK for DevC++ instead of the microsoft SDK. Start the vUpdate program to download it.

    hth
    M.
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    2
    Rep Power
    0
    Sorry! I'm using mingw32 and the GNU C Compiler. Following did the trick though

    #include <windows.h>
    #undef WINAPI
    #define WINAPI
    #include <ddraw.h>

    Thx anyway

IMN logo majestic logo threadwatch logo seochat tools logo