|
제가 시리얼 통신을 할려고 하는데 이것저것 해봐도 안되네요 ㅠㅠ
급합니다 오죽하면 이렇게 새벽에 글을 올리겠습니까
문제는 Pcomm을 쓸려고 하는데
#include <Windows.h>
#include "PComm.h"
int port = 1;
/* Port Control, enable the port */
unsigned char Send_Buffer[7] = {0,};
unsigned char Recv_Buffer[17] = {0,};
Send_Buffer[0] = 0x7;
Send_Buffer[1] = 0xFF;
Send_Buffer[2] = 0xB0;
Send_Buffer[3] = 0x1;
Send_Buffer[4] = 0x0;
Send_Buffer[5] = 0x1C;
Send_Buffer[6] = 0x56;
int ret = sio_open (port);
if (ret == 0)
{
/* Port Control, set baud, parity... */
sio_ioctl (port, B38400, P_NONE | BIT_8 | STOP_1 );
/* Output Data function */
sio_write (port, Send_Buffer, 5);
/* Input Data function */
sio_read (port, Recv_Buffer, 17);
if(strlen(Recv_Buffer) <8)
{
ShowMsgBox("RFID TAG 읽기 실패","ERROR");
}
else
{
ShowMsgBox("RFID TAG 읽기 성공","ERROR");
}
}
else
{
ShowMsgBox("포트설정을 해주세요","ERROR");
}
/* Port Control, disable the port */
sio_close (port);
이렇게 했는데
링크 에러가 나네요
[Linker Error] Unresolved external 'sio_open' referenced from D:\PROJECT\EQUIP\BIN\FACINFOSTOCKENTER.OBJ
[Linker Error] Unresolved external 'sio_close' referenced from D:\PROJECT\EQUIP\BIN\FACINFOSTOCKENTER.OBJ
뭐 이렇게요
PCOMMB.LIB
PCOMM.DLL
PCOMM.H
이 파일들은 그냥 프로젝트 폴더에 넣었구요
고수님들 꼭좀 답변 부탁드립니다
급합니다 ㅠㅠㅠㅠㅠㅠ
|