Skip to main content
gamedev.net
🔒 Locked

Bizarre compiler message

Started by rem24 Nov 6, 2004 at 12:59 PM 6 replies 650+ views
Original Post
rem24
rem24
I'm just starting to learn how to use Direct3D, and the book I'm using has been incredibly unhelpful by forgetting to tell me something or other, because I've copied the code out word-for-word and it still wont compile. Can anybody tell me what is wrong with this code? The custom derived class inherits from a window class that works just fine; /* Custom derived class (window) */ class D3DWindow : public mrWINDOW_Window { /* Declare the Direct3D interfaces */ LPDIRECT3DD8 m_pD3D; LPDIRECT3DDEVICE8 m_pD3DDEVICE; // Blah blah blah }; When I compile it, the compiler tels me "syntax error : missing ';' before identifier 'm_pD3D' ". What gives?
rem24
rem24
Ok, I've made that change, but it's still not having it. Same error.

kVandaele
kVandaele
wouldn't that be LPDIRECTD3D8 and LPDIRECTD3DDEVICE8 ?
rem24
rem24
Ok, I think I've got it, but I'm not quite there.

From what I've been able to gather, LPDIRECT3D8 is typedefed to be a pointer to a IDirect3D9 inteface.

Am I missing a header file or a library where this is typedefed?

If so, how do I include that libarary -> e.g. to my project?
Muhammad Haggag
Muhammad Haggag
You should #include to the project, and add the library d3d8.lib (either via Project->Settings or #pragma comment(lib, "d3d8.lib"))

[Edited by - Coder on November 7, 2004 3:12:49 PM]

kVandaele
kVandaele
be careful not to mix D3D8 with D3D9...
Muhammad Haggag
Muhammad Haggag
Quote:
Original post by kVandaele
be careful not to mix D3D8 with D3D9...

Oops. The d3d9.lib pragma was a typo - it's fixed now. Thanks [smile]

Topic Locked

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

Sign in to reply to this topic.