hi guys
I have a problem.I'm trying to learn port programming
I'm referring
Interfacing with C++
I'm usingCode:Programming Real-World Applications
by Jayantha Katupitiya .
I found this code in his book .My problem is that it's gives me this error
My Code is
Linking...
Code:
#include <dos.h>
#include <conio.h>
#include <stdio.h>
#define BASE 0x378
inportb(int);
void main()
{
unsigned char InputData; // Declare data type for
// various InputData.
InputData = inportb(BASE+1); // Read port at BASE+1.
printf("%2X\n",InputData); // Print result to screen
// as a hexadecimal number.
getch(); // Wait for key press.
}
simple1.obj : error LNK2001: unresolved external symbol _inportb
Debug/simple1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
MS VC++ 6.0
Windows XP Profeesional Service pack 2
please help me
simple1.exe - 2 error(s), 0 warning(s)