Sign in to follow this  
donjonson

question about compiler erro

Recommended Posts

ok so here is the error I M getting. msvc++ express beta 2
tetris.obj : error LNK2019: unresolved external symbol "enum gamestate __cdecl runState(class Piece *,class Board *)" (?runState@@YA?AW4gamestate@@PAVPiece@@PAVBoard@@@Z) referenced in function "void __cdecl GameRun(struct HWND__ *)" (?GameRun@@YAXPAUHWND__@@@Z)
tetris.obj : error LNK2019: unresolved external symbol "enum gamestate __cdecl newpieceState(class Piece *,class Piece *)" (?newpieceState@@YA?AW4gamestate@@PAVPiece@@0@Z) referenced in function "void __cdecl GameRun(struct HWND__ *)" (?GameRun@@YAXPAUHWND__@@@Z)

Share this post


Link to post
Share on other sites
It means that the "unresolved" functions are missing. You wrote the declarations (because the compiler didn't complain, but you never wrote (or linked in) the functions themselves. Usually, this happens because the function doesn't match the declaration, for example a missing "const" or a missing parameter. Perhaps the function is static or in an anonymous namespace, or perhaps you simply forgot to add the source file to the project.

Share this post


Link to post
Share on other sites
Quote:
Original post by Oberon_Command
I think a list of compiler errors and ways to resolve them should be posted to the FAQ, since so many people seem to be confused about this...


All the compilers errors for all compilers would be a bit too much to list. Maybe very common ones would be good to have.

A neat trick that works on visual c++ '03 (and presumable newer versions): select the error in the task list and then hit f1. It will bring you the documentation page explaining the error.

Share this post


Link to post
Share on other sites
Quote:
Original post by Rayno
Quote:
Original post by Oberon_Command
I think a list of compiler errors and ways to resolve them should be posted to the FAQ, since so many people seem to be confused about this...


All the compilers errors for all compilers would be a bit too much to list. Maybe very common ones would be good to have.

A neat trick that works on visual c++ '03 (and presumable newer versions): select the error in the task list and then hit f1. It will bring you the documentation page explaining the error.


Yes, that's what I mean. You can do the F1 trick in 6.0, too, but the problem is, that it isn't well documented in 6.0. Don't know about 2003, tho...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this