Two POLINK errors.

Started by net2011, December 22, 2011, 07:00:57 AM

Previous topic - Next topic

net2011

Hello everyone. I tried running this code

#include <stdio.h>
#include <conio.h>

main()
{
int x, y;

x = 50;
y = 50;

gotoxy(x, y);
printf("This phrase got moved to %d, %d\n", x, y);
getch();
return 0;
}
and it is giving me "POLINK: error: Unresolved external symbol 'gotoxy'" and "POLINK: error: Unresolved external symbol 'getch'. Thanks for the help.

net2011

Hi everyone. I changed my code to

#include <stdio.h>
#include <conio.h>

main()
{
int x, y;

x = 50;
y = 50;

_gotoxy(x, y);
printf("This phrase got moved to %d, %d\n", x, y);
_getch();
return 0;
}


and it worked just fine.

CommonTater

Another solution ... particularly when updating old Turbo C code is to go into...

Project -> Project Options -> Compiler -> Define Compatibility Names = Checked.

This will bypass the underscore notation used with non-C99 standard functions.

Also ... You should know that conio.h is a non-standard library.  I would imagine it's only included for updating old code and should not be used in newer software unless there is no interest whatsoever in creating portable code.