Author Topic: TinyCurses with VC++ (Visual Studios 2008)  (Read 17938 times)

PaulBlay

  • Rogueliker
  • ***
  • Posts: 83
  • Karma: +0/-0
    • View Profile
TinyCurses with VC++ (Visual Studios 2008)
« 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++
Creating a SDL_ttf project with VC++
Creating a TinyCurses project with VC++

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.

PaulBlay

  • Rogueliker
  • ***
  • Posts: 83
  • Karma: +0/-0
    • View Profile
Re: TinyCurses with VC++ (Visual Studios 2008)
« Reply #1 on: June 09, 2009, 06:19:49 PM »
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
Code: [Select]
extern "C"
{
#include "tinycurses.h"
}
to include it.