I am starting to learn how to use PCAN-UDS API.
Unfortunately, I get starter errors, "undefined reference to 'UDS_Initialize@20' and "undefined reference to 'UDS_Uninitialize@4'.
My code:
Code: Select all
#include <iostream>
#include <windows.h>
#include "PCANBasic.h"
#include "PCAN-ISO-TP.h"
#include "PCAN-UDS.h"
using namespace std;
int main()
{
TPUDSCANHandle Channel;
TPUDSStatus Status;
// Set the PCAN-Channel to use (PCAN-USB Channel 1)
Channel = PUDS_USBBUS1;
// Initializing of the UDS Communication session
Status = UDS_Initialize(Channel, PUDS_BAUD_250K, 0, 0, 0);
printf("Initialize UDS: %i\n", (int)Status);
UDS_Uninitialize(Channel);
}

EDIT: Peak dongle is connected to PC, but not to controller (server).