Skip to main content
gamedev.net
🔒 Locked

Linker error

Started by Yohumbus 1 reply 300+ views
Original Post
Yohumbus
Yohumbus
I''m trying to get started with directx and I downloaded the C++ SDK from Microsoft. I placed everything where it was supposed to go in the dev-cpp directory (which I''m using btw). The problem I am having is that whenever I try to compile the direct3d tutorial 1 to create the device I always get a linker error that says [Linker error] undefined reference to `Direct3DCreate9@4''. I have tried renaming the libraries from *.lib to lib*.a made sure over and over that the library folder is being linked and nothing. The weird part is that if I remove the reference to Direct3DCreate9 it compiles even though CreateDevice and other functions are still in. Anyway after looking at the directx8.1 package the main thing it has different is it has d3dx8d.dll in the dev-cpp\dll folder so I’m thinking there is a corresponding one somewhere but I cant find it in system32. Anyway if you could help me I would appreciate it.
ASCII stupid question, get a stupid ANSI
spillsome
spillsome
on Visual Studio .net

Check the "Additional dependencies"

Project - Properties - Linker - Input
and add d3dxof.lib dxguid.lib d3dx9dt.lib d3d9.lib winmm.lib
to "Additional Dependencies"
Yohumbus
Yohumbus
Thx for the reply but I am using dev-cpp. Dont worry though I figured out what the problem is! From what I can tell the libraries that visual studio uses cant be used by the GNU compiler because of the way in mangles the names. The libraries do have everything that is needed but for WINAPI and STDCALL functions the compiler must have @nn at the end of the names which the lib currently dont have.
ASCII stupid question, get a stupid ANSI

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.