undefined reference to `CheckError' - solved

C, C++, and Visual C++
asd
Phidgetsian
Posts: 5
Joined: Wed Sep 19, 2018 12:32 pm
Contact:

undefined reference to `CheckError' - solved

Postby asd » Fri Sep 21, 2018 2:04 am

Hi guys,
just in case anyone else is having this problem.
I was trying to compile TemperatureSensor_Example.c but it complained about the reference to CheckError (declared in PhidgetHelperFunctions.c).

I had to modify the original make file (SRCS) to also compile PhidgetHelperFunctions.c:

The Makefile

Code: Select all

BIN=example
SRCS=TemperatureSensor_Example.c ../Common/PhidgetHelperFunctions.c
LIBS=-lphidget22
LIBDIR=-I/home/asd/phidgets/libphidget22-1.0.0.20180905/.libs
INCDIR=-L/home/asd/phidgets/examples/Phidget22_TemperatureSensor_C_Ex_20180905/Common

CFLAGS=-ggdb3 -Wall -v

all:
   ${CC} ${CFLAGS} -o ${BIN} ${SRCS} ${INCDIR} ${LIBDIR} ${LIBS}


All best,
Matthias

Return to “C/C++”

Who is online

Users browsing this forum: No registered users and 2 guests