Jump to content
  • Advertisement
Sign in to follow this  
donjonson

question about compiler erro

This topic is 4828 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!