CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    23

    Unhappy My game won't complile

    I'm following a tutorial in game development. And for some reason it won't compile. I think it may be a problem with recursive definitons or something?

    Here is the list of compiler errors that I get:
    Error 1 error C2236: unexpected 'class' 'Character'. Did you forget a ';'? c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.h 11
    Error 2 error C2236: unexpected 'class' 'DrawEngine'. Did you forget a ';'? c:\users\duncan\documents\visual studio 2005\projects\game\game\drawengine.h 5
    Error 3 error C2143: syntax error : missing ';' before '{' c:\users\duncan\documents\visual studio 2005\projects\game\game\drawengine.h 5
    Error 4 error C2447: '{' : missing function header (old-style formal list?) c:\users\duncan\documents\visual studio 2005\projects\game\game\drawengine.h 5
    Error 5 error C2143: syntax error : missing ')' before '*' c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.h 17
    Error 6 error C2143: syntax error : missing ';' before '*' c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.h 17
    Error 7 error C2460: 'GameEnvironment::DrawEngine' : uses 'GameEnvironment', which is being defined c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.h 17
    Error 8 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.h 17
    Error 9 error C2062: type 'int' unexpected c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.h 17
    Error 10 error C2327: 'GameEnvironment::DrawEngine' : is not a type name, static, or enumerator c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.h 29
    Error 11 error C2143: syntax error : missing ';' before '*' c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.h 29
    Error 12 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.h 29
    Error 13 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.h 29
    Error 14 error C2065: 'de_' : undeclared identifier c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.cpp 4
    Error 15 error C2597: illegal reference to non-static member 'GameEnvironment::DrawEngine' c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.cpp 4
    Error 16 error C2062: type 'int' unexpected c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.cpp 4
    Error 17 error C2143: syntax error : missing ';' before '{' c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.cpp 5
    Error 18 error C2447: '{' : missing function header (old-style formal list?) c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.cpp 5
    Error 19 error C2065: 'de' : undeclared identifier c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.cpp 63
    Error 20 error C2227: left of '->drawBackground' must point to class/struct/union/generic type c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.cpp 63
    Error 21 error C2236: unexpected 'class' 'Character'. Did you forget a ';'? c:\users\duncan\documents\visual studio 2005\projects\game\game\gameenvironment.h 11

    I will attach the code.
    Please help, I can't continue until this problem is solved.
    Thanks
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2005
    Location
    Prague, Czech Republic
    Posts
    208

    Re: My game won't complile

    The error is exactly what the compiler is telling you - you're missing semicolon after that enum declaraion in gameenvironment.h.

  3. #3
    Join Date
    Mar 2007
    Posts
    23

    Re: My game won't complile

    Oh my goodness. Some one shoot me.
    Thanks a lot!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured