Jump to content
  • Advertisement
Sign in to follow this  
programwizard

Dev-C++ and DirectX9

This topic is 4763 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
d3d9.lib is the import library for the Visual Studio linker, the file you want is libd3d9.a which is the MinGW version.

Share this post


Link to post
Share on other sites
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#.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
afaik, #pragma comment(lib,..) is msvc-specific. try adding -ld3d9 to your linker-step.

Share this post


Link to post
Share on other sites
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 ;)

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!