Emergency!!!-Stupid C++ error-MSVC++ +DirectX
I get a bucnh of crappy errors when I try to build a graphics sample with VC++. I used to use DirectX7, but I upgraded to DirectX8 and modified it for DX8. But I''m having problems with header files that use the D3D8 types. For instance, I use a function: operator LPD3DMATERIAL8()
{
return *this;
}
and it gives me wierd errors like, "This looks like a ctor..blah blah". I have the include file correct #include ??? and the libraries are included. What might be going wrong. This sample is due to my teacher in two days!!!! Ahhhhhhhhh!!!!!!!!
What are YOU doing!!
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
goto ''tools->options->directories'' ''inlude files'' & ''libraries'' sections. Remove the dx8 entries & manually add the dx7 paths. If the errors are still there, it''s not a dx8 problem.
Maybe you shouldn''t have dicked with a working system when you had a deadline looming in two days
And try to come up with more descriptive titles.
Maybe you shouldn''t have dicked with a working system when you had a deadline looming in two days
![](wink.gif)
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Sorry about the title, I was busy throwing my wireless mouse across the room when I typed it!!. Anyway, I upgraded to DX8 a while ago and most of my library is converted. I have some wrapper classes that encapsulate things like D3DMATERIAL8 but VC++ won''t recognize the type. I checked my include directories and library directectories and they are correct. Any other ideas.
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
Check your includes and make sure you are including d3d8.h and not d3d.h.
GamesToGO: The Console Gamer''s Paradise
GamesToGO: The Console Gamer''s Paradise
--- Official D Blog | Learning D | The One With D | D Bits
Yeah they are
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
Unless that's embedded within the class defintion, you need a scope resolution in front of the operator overload
Magmai Kai Holmlor
- The disgruntled & disillusioned
Edited by - Magmai Kai Holmlor on March 7, 2001 12:39:18 AM
class CMyGfxClass{operator LPD3DMATERIAL8();};CMyGfxClass::operator LPD3DMATERIAL8(){return *this;}
Magmai Kai Holmlor
- The disgruntled & disillusioned
Edited by - Magmai Kai Holmlor on March 7, 2001 12:39:18 AM
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Its embedded
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
I''ve had that error when I have a method in my class, that does not return anything, but i''ve forgotten to declare the retrun type void.
Stoo
Stoo
Ok, I scrapped the operator stuff, it seems ''LP''D3DMATERIAL8 is not quite the same as it is in DX7. So now I have another question that is just as wierd. I made myself a class sL3D to do light work for me. Basically its derived from _D3DLIGHT8 and has a buncyh of constructor to make creating basic lights alot easier. It uses the memset(blah, blah, blah) function to initialize a temporary veriable in the constructors. Its called like this.
sL3D temp;
memset(temp, 0, _D3DLIGHT8);
this worked great in DX7, but in DX8 it says it can''t convert from temp (sL3D) to _D3DLIGHT8. But they are exactly the same!! sL3D is derived from _D3DLIGHT8 and contains no extra members, only constructors. What''s going on.....AHHH!
sL3D temp;
memset(temp, 0, _D3DLIGHT8);
this worked great in DX7, but in DX8 it says it can''t convert from temp (sL3D) to _D3DLIGHT8. But they are exactly the same!! sL3D is derived from _D3DLIGHT8 and contains no extra members, only constructors. What''s going on.....AHHH!
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement