Thread: Visual C++ help

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    361

    Visual C++ help

    I just got visual C++ and have a book that uses code for it. So when I try to use one of the example programs it says it cannot find d3dapp.h. I found out that that wasn't even on my computer, and the program needs it to run.

    I have DirectX 8.0 instead of 9, but that program was written with DirectX8.0 anyways. There are also a few other files in it that it cannot find. Maybe they changed the names of those files to something else?

    Anyways, any help would be much appreciated.

  2. #2
    Registered User codingmaster's Avatar
    Join Date
    Sep 2002
    Posts
    309
    You have to install the DirextX development kit, which includes all this files.........

    Download it at http://msdn.microsoft.com/

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    It was the DirectX 8.0 SDK. And I am getting 9.0 SDK right now.

  4. #4
    Registered User codingmaster's Avatar
    Join Date
    Sep 2002
    Posts
    309
    Have u added the DirectX include path to the top of the Visual include path options?

  5. #5
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    I have added the DX include paths, made the lib at the top as well. I just finished installing DX9.0 SDK and used an example and it worked. I spent some time trying to figure out why that one worked and mine didn't. I haven't been able to find out.

    Maybe I am making the workspace the wrong type, what is it supposed to be? I tried Win32 Console.

    If someone would like me to send the project that doesn't work I can. I assume you have the billboard sample.
    Last edited by Glirk Dient; 06-24-2003 at 05:58 PM.

  6. #6
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    Win32 Console Apps are for basic things, I hate to say it, but they are wrongly called "DOS boxes", (there is no DOS on a modern Windows box). A GUI application is a Win32 Application. I would say you do not want a Console App here.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  7. #7
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    Alright, thanks..I'm one step further. It can find the files but now I get a ton of warnings and an error.

    c:\dxsdk\samples\c++\common\include\d3dapp.h(50) : error C2146: syntax error : missing ';' before identifier 'm_d3dEnumeration'
    c:\dxsdk\samples\c++\common\include\d3dapp.h(50) : error C2501: 'CD3DEnumeration' : missing storage-class or type specifiers
    c:\dxsdk\samples\c++\common\include\d3dapp.h(50) : error C2501: 'm_d3dEnumeration' : missing storage-class or type specifiers
    c:\dxsdk\samples\c++\common\include\d3dapp.h(51) : error C2146: syntax error : missing ';' before identifier 'm_d3dSettings'
    c:\dxsdk\samples\c++\common\include\d3dapp.h(51) : error C2501: 'CD3DSettings' : missing storage-class or type specifiers
    c:\dxsdk\samples\c++\common\include\d3dapp.h(51) : error C2501: 'm_d3dSettings' : missing storage-class or type specifiers
    c:\dxsdk\samples\c++\common\include\d3dapp.h(71) : error C2061: syntax error : identifier 'D3DCAPS9'
    c:\dxsdk\samples\c++\common\include\d3dapp.h(94) : error C2146: syntax error : missing ';' before identifier 'm_pD3D'
    c:\dxsdk\samples\c++\common\include\d3dapp.h(94) : error C2501: 'LPDIRECT3D9' : missing storage-class or type specifiers
    c:\dxsdk\samples\c++\common\include\d3dapp.h(94) : error C2501: 'm_pD3D' : missing storage-class or type specifiers
    c:\dxsdk\samples\c++\common\include\d3dapp.h(95) : error C2146: syntax error : missing ';' before identifier 'm_pd3dDevice'
    c:\dxsdk\samples\c++\common\include\d3dapp.h(95) : error C2501: 'LPDIRECT3DDEVICE9' : missing storage-class or type specifiers
    c:\dxsdk\samples\c++\common\include\d3dapp.h(95) : error C2501: 'm_pd3dDevice' : missing storage-class or type specifiers
    c:\dxsdk\samples\c++\common\include\d3dapp.h(96) : error C2146: syntax error : missing ';' before identifier 'm_d3dCaps'
    c:\dxsdk\samples\c++\common\include\d3dapp.h(96) : error C2501: 'D3DCAPS9' : missing storage-class or type specifiers
    c:\dxsdk\samples\c++\common\include\d3dapp.h(96) : error C2501: 'm_d3dCaps' : missing storage-class or type specifiers
    c:\dxsdk\samples\c++\common\include\d3dapp.h(119) : error C2061: syntax error : identifier 'D3DCAPS9'
    c:\dxsdk\samples\c++\common\include\d3dfont.h(38) : error C2146: syntax error : missing ';' before identifier 'm_pd3dDevice'

    I can't make any sense on why it says there are errors in those files.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  4. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM