I'm doing my first C project in, maybe, 15 years, and have gotten stuck.
I'm trying to link a 3rd party library into my project. I've installed the headers in ./include/ft and the libs in ./lib/ft
Here's my compiler command and associated output:
[root@wayne tele]# g++ -g lib/ft/libmbusmaster.a -lm -lz -o client client.o client.o: In function `mbOpenTCP(char*)': /home/tele/tele/client.c:49: undefined reference to `mbusMaster_createTcpProtocol' /home/tele/tele/client.c:50: undefined reference to `mbusMaster_openTcpProtocol' /home/tele/tele/client.c:54: undefined reference to `mbusMaster_getErrorText' collect2: ld returned 1 exit status
I have the right library, based on:
[root@wayne tele]# strings lib/ft/libmbusmaster.a | grep mbusMaster_createTcpProtocol mbusMaster_createTcpProtocol mbusMaster_createTcpProtocol
I include it via:
#include "include/ft/MbusMasterCexports.h" I've gone through all the standard PATH checks, and case-sensitive checks. The environment is a Fedora 8 box.
The third party library is one I'm considering buying, but was trying to get a sample project compiled before I commit. No tech support from the third party until I purchase, obviously.