NO

Author Topic: Two POLINK errors.  (Read 3458 times)

net2011

  • Guest
Two POLINK errors.
« on: December 22, 2011, 07:00:57 AM »
Hello everyone. I tried running this code

Code: [Select]
#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

  • Guest
Re: Two POLINK errors.
« Reply #1 on: December 22, 2011, 07:16:29 AM »
Hi everyone. I changed my code to

Code: [Select]
#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

  • Guest
Re: Two POLINK errors.
« Reply #2 on: December 22, 2011, 08:21:43 AM »
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.