[DX8] Help!

Started by
20 comments, last by Flanders 23 years, 2 months ago
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?
- Flanders -
Advertisement
d''oh! Are you sure you''ve included the d3d8.lib in your project?

Learn about game programming!Games Programming in C++: Start to Finish
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!
- Flanders -
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.
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
- Flanders -
Bump ...
- Flanders -
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 -
- Flanders -
Also I am using DX8
- Flanders -
Just wondering, what is Dev C++?
An IDE for C++, please check it out at http://www.bloodshed.net/

- Now back on topic...
- Flanders -

This topic is closed to new replies.

Advertisement