Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Flanders

[DX8] Help!

This topic is 6453 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

I just copied a tutorial to my PC and I''m getting the error message when the compiler is linking: d:\c++ development\projects\spacegame\window.o: In function `WinMain'': //d/c++ development/projects/spacegame/window.cpp:124: undefined reference to `D3DXShutdown(void)'' d:\c++ development\projects\spacegame\d3dx_methods.o: In function `D3DXInit(HWND__ *)'': //d/c++ development/projects/spacegame/d3dx_methods.cpp:49: undefined reference to `Direct3DCreate8@4'' D3DXInit() is a method I''ve created which just initializes all the D3DX objects. Direct3DCreate8 is a built in DX8 method, is it not? Any suggestions would be appretiated.. I can''t seem to figure out what "undefined reference" should mean?

Share this post


Link to post
Share on other sites
Advertisement
Do I need to write something into the .cpp file for this?

I copied this right out of a tutorial, and they didn''t mention anything..

I have:

#include "windows.h"
#include "d3dx8.h"

- is this what I need? As far as I knew this was it..

Also, in my compiler options I''m including my dx8 sdk directory under libraries.

It also might help to know i''m using Dev C++
Thanks for the help!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You need to add the DirectX libraries to the linker. Go to Project - Settings - Than click on the link tab. You need to add d3d.lib to the list of all the other include libraries. You also need to tell the compiler where to find the library, and the DirectX headers (It is probably finding the old ones). So close that window go to Tools - Options than click on the directories tab, select include from under the show directories for box, and add the path to your directX headers. Now select Library files from the Show Directories for box, and add the path to your directX libraries. Move both of these paths to the top of the list (The compiler will use the first one it finds). Hope I didn''t confuse you more.

Share this post


Link to post
Share on other sites
I don''t think you''re looking at Dev C++. I already have the sdk directories included in the compiler options.

I can''t see any menus like that either way..

Is there anybody who has Dev C++ who has had a similar problem

Share this post


Link to post
Share on other sites
Really... Help!

I''m really confused here... I think I have everything included that I need to include, I''ve been able to compile some other small projects (but nothing major) - do these error messages mean anything to you guys?

I appretiate your time and help!



- Flanders -

Share this post


Link to post
Share on other sites

  • 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!