News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

conio.h

Started by Kenneth Bull, November 06, 2005, 12:40:18 AM

Previous topic - Next topic

Kenneth Bull

a simple program:

#include <conio.h>

int main()
{
getch();
return 0;
}

gives the following error:

POLINK: error: Unresolved external symbol '_getch'.
POLINK: fatal error: 1 unresolved external(s).
*** Error code: 1 ***
Done.


The compiler works perfectly for any header and associated functions that I've tried, except conio.h.  Does anyone know what I might be missing?

Thank you.

Pelle

Either use _getch() (not getch)..., or use the compiler option /Go.

Pelle
/Pelle

Kenneth Bull

Quote from: "Pelle"Either use _getch() (not getch)..., or use the compiler option /Go.

Pelle

Works beautifully.  Might I ask why the _ is required with default options for conio, but not for other functions (like io functions related to stdio.h)?

Pelle

Functions that are not part of standard C (currently "C99") have names that start with an underscore...

Pelle
/Pelle