Temple of The Roguelike Forums
Development => Programming => Topic started by: PaulBlay on June 09, 2009, 03:58:28 PM
-
I have gone back to the first step and noted down exactly how I tried to get TinyCurses to work. (
See the following pages in order:
Creating a SDL project with VC++ (http://roguebasin.roguelikedevelopment.org/index.php?title=SDL)
Creating a SDL_ttf project with VC++ (http://roguebasin.roguelikedevelopment.org/index.php?title=SDL_ttf)
Creating a TinyCurses project with VC++ (http://roguebasin.roguelikedevelopment.org/index.php?title=TinyCurses)
All except the last step worked (but note that the SDL_ttf demo code is problematic).
The error messages I get are:
main-tc.obj : error LNK2019: unresolved external symbol "int __cdecl getch(void)" (?getch@@YAHXZ) referenced in function _SDL_main main-tc.obj : error LNK2019: unresolved external symbol "int __cdecl refresh(void)" (?refresh@@YAHXZ) referenced in function _SDL_main main-tc.obj : error LNK2019: unresolved external symbol "int __cdecl printw(char const *,...)" (?printw@@YAHPBDZZ) referenced in function _SDL_main
If you can work out a step I missed / got wrong please let me know.
-
If you can work out a step I missed / got wrong please let me know.
artanis pointed out that it's because I'm including tinycurses.h from a .cpp file
You need to use
extern "C"
{
#include "tinycurses.h"
}
to include it.