Archived

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

il_maestro

VC++6 & DX9 compile problem

Recommended Posts

il_maestro    100
Hi everyone, i''m not an expert about c++ and i''m a beginner with VisualC++ 6 environement. i''m writing here because i have a problem i really can''t solve alone... i''m trying to work with some examples of the book "Advanced 3D game programming with DirectX 9.0 - Peter Walsh", and i haveVC++6 & DX9 SDK installed. I have the option under tools->options set in the right wat, pointing to dx9 sdk inclede and library directories...BUT when i try to build an example, this is the result: Compiling... StdAfx.cpp c:\programmi\dx9sdk\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800 c:\programmi\microsoft visual studio\vc98\include\xtree(629) : error C2059: syntax error : ''?'' c:\programmi\microsoft visual studio\vc98\include\xtree(629) : error C2065: ''_Y'' : undeclared identifier c:\programmi\microsoft visual studio\vc98\include\xtree(629) : error C2275: ''_A'' : illegal use of this type as an expression c:\programmi\microsoft visual studio\vc98\include\xtree(629) : error C2143: syntax error : missing '','' before '')'' c:\programmi\microsoft visual studio\vc98\include\xtree(631) : error C2951: template declarations are only permitted at global or namespace scope c:\programmi\microsoft visual studio\vc98\include\xtree(632) : error C2976: ''_Tree'' : too few template arguments c:\programmi\microsoft visual studio\vc98\include\xtree(602) : see declaration of ''_Tree'' c:\programmi\microsoft visual studio\vc98\include\xtree(633) : error C2143: syntax error : missing '','' before ''<='' c:\programmi\microsoft visual studio\vc98\include\xtree(633) : error C2433: ''bool'' : ''inline'' not permitted off data declarations c:\programmi\microsoft visual studio\vc98\include\xtree(633) : error C2059: syntax error : ''operator '' c:\programmi\microsoft visual studio\vc98\include\xtree(635) : error C2143: syntax error : missing '')'' before ''{'' c:\programmi\microsoft visual studio\vc98\include\xtree(635) : error C2059: syntax error : ''{'' c:\programmi\microsoft visual studio\vc98\include\xtree(635) : error C2143: syntax error : missing '';'' before ''{'' c:\programmi\microsoft visual studio\vc98\include\xtree(635) : error C2447: missing function header (old-style formal list?) c:\programmi\microsoft visual studio\vc98\include\xtree(636) : error C2954: template definitions cannot nest c:\programmi\microsoft visual studio\vc98\include\map(44) : error C2039: ''reference'' : is not a member of ''_A'' c:\programmi\microsoft visual studio\vc98\include\xtree(632) : see declaration of ''_A'' c:\programmi\microsoft visual studio\vc98\include\map(140) : see reference to class template instantiation ''std::map<_K,_Ty,_Pr,_A>'' being compiled c:\programmi\microsoft visual studio\vc98\include\map(44) : error C2146: syntax error : missing '';'' before identifier ''_Tref'' c:\programmi\microsoft visual studio\vc98\include\map(140) : see reference to class template instantiation ''std::map<_K,_Ty,_Pr,_A>'' being compiled c:\programmi\microsoft visual studio\vc98\include\map(44) : error C2501: ''_Tref'' : missing storage-class or type specifiers c:\programmi\microsoft visual studio\vc98\include\map(140) : see reference to class template instantiation ''std::map<_K,_Ty,_Pr,_A>'' being compiled c:\programmi\microsoft visual studio\vc98\include\map(48) : error C2040: ''reference'' : '' &'' differs in levels of indirection from ''int'' c:\programmi\microsoft visual studio\vc98\include\map(140) : see reference to class template instantiation ''std::map<_K,_Ty,_Pr,_A>'' being compiled c:\programmi\microsoft visual studio\vc98\include\map(92) : error C2143: syntax error : missing '';'' before ''['' c:\programmi\microsoft visual studio\vc98\include\map(140) : see reference to class template instantiation ''std::map<_K,_Ty,_Pr,_A>'' being compiled c:\programmi\microsoft visual studio\vc98\include\map(92) : error C2501: ''_Tref'' : missing storage-class or type specifiers c:\programmi\microsoft visual studio\vc98\include\map(140) : see reference to class template instantiation ''std::map<_K,_Ty,_Pr,_A>'' being compiled c:\programmi\microsoft visual studio\vc98\include\map(44) : fatal error C1004: unexpected end of file found c:\dati\luigi\manuali\advanced 3d game programming with directx 9.0_with code\advanced 3d game programming with directx 9.0_with code\dx9files-9682\book code\chapter 02\gamelib\sound.h(30) : see reference to class template instantiation ''std ::map,class std::allocator >'' being compiled Error executing cl.exe. DDSample.exe - 21 error(s), 0 warning(s) Someone could please try to help me, and suggest me what i''m could be missing? I followed the instructions in the book, really bare-bone style btw. Best regards.

Share this post


Link to post
Share on other sites
Oluseyi    2103
Show the code, not the errors.

It''s obvious that the errors generate pertain to the STL, but that doesn''t mean that the errors are in your template code. Peculiarities of the C++ parser mean that an error can propagate into other areas (which is why we always recommend looking at the region just prior to the first incidence of error).

Share this post


Link to post
Share on other sites
il_maestro    100
Ok, ok... while i was cutting&pasting i realized that is too much to write here:
i could let a link for the archive... http://www.wordware.com/files/dx9/files/dx9files-9682.zip,
the example i'm trying is the second chapter one.
I hope someone will be so kind to take this disturb


[edited by - il_maestro on March 24, 2004 3:36:31 AM]

Share this post


Link to post
Share on other sites