Closed jpelletier closed 3 years ago
Found a solution!
Content of Makefile:
LDFLAGS=-lmraa
CXXFLAGS=-Wall
TARGETS=touch_switch
all: ${TARGETS}
clean:
rm -f ${TARGETS}
When running make, this command is generated:
g++ -Wall -lmraa touch_switch.cpp -o touch_switch
Generates undefined references.
If we put -lmraa at the end, it works. g++ -Wall touch_switch.cpp -o touch_switch -lmraa
compile and link are successfull.
The library has been successfully compiled and installed in /usr/local/lib. We can see all the labels in the .so file with midnight commander. All the files are present, .so files, link files and includes. When trying to link with the library, it fails to find the references.