Newsgroup: it.comp.lang.c++
Titolo: [HELP] Problemi con VC++6 e DX9 SDK

Ciao a tutti, scrivo perchè ho un problema e sono alla frutta :)
Premesso che non sono un espertone di c++, e che sono un novellino
nell'ambiente MS Visual C++ 6.0, espongo la questione:
sto cercando di far funzionare del codice incluso in un libro di directx9
(Advanced 3D game programming with DirectX 9.0 di Peter Walsh), e sulla mia
macchina ho istallato il Visual C++ 6 e il DirectX 9 SDK, ma non vuole
girare...
ho controllato che sotto tools->options ci fossero le directory nell'elenco
degli include e library, e ci sono.
Quando prendo un esempio qualunque e faccio il build, ottengo questo:
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 on data declarations
c:\programmi\microsoft visual studio\vc98\include\xtree(633) : error C2059:
syntax error : 'operator <op>'
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 CWaveSoundRead *,int,struct std::less<class CWaveSoundRead
*>,class std::allocator<int> >' being compiled
Error executing cl.exe.
DDSample.exe - 21 error(s), 0 warning(s)
Qualche anima pia saprebbe dirmi cosa manco di fare/includere? Ho seguito
ogni indicazione, peraltro generica, del manuale.
Saluti.

Ciao,
Questo newsgroup si occupa del linguaggio C++ in quanto tale, e non di
aspetti specifici di particolari implementazioni. Per questo non e' il
posto piu' adatto per porre domande specifiche come la tua.
Potresti avere piu' fortuna su uno dei seguenti gruppi:
Per Win32 (95, 98, NT): it.comp.programmare.win32
Per Dos/Win 3.x: it.comp.os.dos
Per Linux: it.comp.os.linux.development
Per C++Builder: i gruppi borland.public.cppbuilder.*, disponibili sul
server 
newsgroups.borland.com
 (prevalentemente in
inglese, ma si puo' postare anche in italiano)
Grazie,
Andrea Laforgia