Someone must know

This is a discussion on Someone must know within the C++ Programming forums, part of the General Programming Boards category; I am running a program in MSVC and it won't run because it gets a ton of errors from the ...

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

    Someone must know

    I am running a program in MSVC and it won't run because it gets a ton of errors from the include files. I have no idea why, maybe the code itself. But anyways, I was wondering if maybe I am using the wrong project type.

    I have gotten examples that come with the compiler to work.

    I am using Directx9.0 and the code is made for 8.0. I can send you the code that doesn't work or post some errors if you feel that will help.

    Any suggestions are welcomed.

  2. #2
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    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

    I get 102 of these, and it says it stops at 100 so I'm guessing theres a ton more, which is why I think its something to do with the workspace or the code itself.
    Last edited by Glirk Dient; 07-04-2003 at 12:57 PM.

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    may be something as simple as a missing }, but we'll never know without the code immediately preceding the line referred to in the first error message and the line itself. May even need more than that, but that's the next step: matching pertinent code to the first error message.

  4. #4
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    >>missing ';' before identifier 'm_d3dEnumeration'
    looks more like a missing semicolon
    Away.

  5. #5
    Registered User
    Join Date
    Jul 2003
    Posts
    17
    Syntax errors, you're missing the semicolon somewhere.

  6. #6
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    The program I am trying to run is called basic. Those errors are from d3dapp.

  7. #7
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    Actually, here is my project, not sure if the workspace includes the files I am trying to compile though.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    Anyone found anything?

  9. #9
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    Actually salem this is example code from a book I bought written for the compiler, so I want it to work so I can use my book and din't waste money on it.

  10. #10
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Looks like you aren't linking to the correct libraries and/or including the correct headers. Check and make sure.

  11. #11
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    I made sure I followed the instructions in the book exactly.

  12. #12
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    Someone has to have an answer, does it work for you when you compile?

  13. #13
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    looks like it doesn't know what CD3DEnumeration is.

    Never mind the semicolon, just figure out where CD3DEnumeration lives and make sure its included
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  14. #14
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Why don't you zip up your project and attach it. Then we can take a closer look.

  15. #15
    Registered User
    Join Date
    Jan 2003
    Posts
    361
    I did zip it up, and I did make sure to include where it lives, it says theres an error with it, so it must be finding it.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21