Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parallel port access

Status
Not open for further replies.

BCD12

Technical User
Aug 15, 2005
1
0
0
TR
Hello,

I am trying to reach LPT. I wrote a simple code...

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

#define CS 1
#define LPT 0x378

char port_data;

int main()
{

while(1)
{
outp(LPT, 0x01);
}

return 0;
}

and it doesn't work with the following error.

Compiling...
parrrrrrr.cpp
Linking...
parrrrrrr.obj : error LNK2001: unresolved external symbol _outp
Debug/oo yeahh.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

oo yeahh.exe - 2 error(s), 0 warning(s)


I really can't understand where is the error. Can you help?

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top