Dev-C++ and DirectX9
Sorry if this belongs in the DirectX forum, but I'm still a "beginner", so...
I'm making a program with Dev-Cpp that uses Direct3D. When I go to compile, I get the error "[Linker Error]: undefined reference to Direct3DCreate9@4". I also get something like "[Linker Error] undefined reference to _gxx_personality_v0" (a line wich I have nowhere in my code). I know I set it to link to the d3d9.lib file in both the compiler options and the project options menu, and i included d3d9.h does anyone know what could be wrong? Thanks!
You need to include the library files do something like this your cpp or h file.
This may help, even though its for directx8.
#pragma comment(lib, "libd3d9.a")
This may help, even though its for directx8.
d3d9.lib is the import library for the Visual Studio linker, the file you want is libd3d9.a which is the MinGW version.
Thanks. I'm using the book Beginning Game Programming, and even though it coumes with Dev-Cpp, it covers MSVC6. Thanks again!
If I were you, I'd ditch Dev-C++ and use Visual Studio. Not only is a better IDE, in my opinion, but also seems to be more stable with the environment. You might also want to have a stab at Managed DirectX using C#.
Thing is, Visual Studio costs money, and Dev is free. Except for 2005 Express Edition. I think I'll go with that. Does that work with DirectX? Also, I added the line #pragma comment(lib, "libd3d9.a") and I still get the linker errors. I think it's because I don't have that file; does anyone know where I can get it?
D:/Program/Dev-Cpp/lib/libd3dx9.a
D:/Program/Dev-Cpp/lib/libwinmm.a
D:/Program/Dev-Cpp/lib/libd3d9.a
D:/Program/Dev-Cpp/lib/libdinput8.a
D:/Program/Dev-Cpp/lib/libdxguid.a
these are the libs that im linking to often
and are u sure u have the directx pack for DeV c++
link to these files in the project->parameters->linkers
i love Dev Cpp and think it has good interface and is free
on the other hand it can be quite unstable : /
well i it works ;)
D:/Program/Dev-Cpp/lib/libwinmm.a
D:/Program/Dev-Cpp/lib/libd3d9.a
D:/Program/Dev-Cpp/lib/libdinput8.a
D:/Program/Dev-Cpp/lib/libdxguid.a
these are the libs that im linking to often
and are u sure u have the directx pack for DeV c++
link to these files in the project->parameters->linkers
i love Dev Cpp and think it has good interface and is free
on the other hand it can be quite unstable : /
well i it works ;)
OK, so I go into Project Options, I go to Parameters, I go to the linker field, and I type: -l the full path leading to my d3d9.lib file. Now when I compile, I get [Build Error] Error 1. This is making me mad... plz help!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement