Hi all. I’m trying to use the PxConfig… functions. What I have compiles but then I try to build the project I get a load of errors saying
*** [C:/QNX630/workspace/Emulator/x86/o/Emulator] Error 1 Emulator
*** [C:/QNX630/workspace/Emulator/x86/o-g/Emulator_g] Error 1 Emulator
scenario_cancel_clicked.o * In function `scenario_cancel_clicked': undefined reference to `PxConfigSetCx'
scenario_cancel_clicked.o * undefined reference to `PxConfigGetCx' undefined reference to `PxConfigSetCx'
scenario_cancel_clicked.o * undefined reference to `PxConfigOpenCx' undefined reference to `PxConfigSetCx'
scenario_cancel_clicked.o * undefined reference to `PxConfigSetCx' undefined reference to `PxConfigGetCx'
scenario_cancel_clicked.o * undefined reference to `PxConfigSetCx' undefined reference to `PxConfigOpenCx'
undefined reference to `PxConfigGetCx' scenario_cancel_clicked.c Emulator/src line 29
undefined reference to `PxConfigOpenCx' scenario_cancel_clicked.c Emulator/src line 29
undefined reference to `PxConfigSetCx' scenario_cancel_clicked.c Emulator/src line 29
undefined reference to `PxConfigSetCx' scenario_cancel_clicked.c Emulator/src line 30
Heres my code
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <photon/PxProto.h>
/* Local headers */
#include "ablibs.h"
#include "abimport.h"
#include "proto.h"
int
scenario_cancel_clicked( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo )
{
if (PxConfigOpen("myconfig", PXCONFIG_WRITE))
{
// read parameters from the file
PxConfigClose();
}
else
{
(void)printf("Failed to open configuration file\n");
}
return( Pt_CONTINUE );
}
Can anyone see what im doing wrong?