2 messages in com.mysql.lists.plusplusLink Error
FromSent OnAttachments
Haines, Charles A.14 Sep 2005 06:54 
Warren Young14 Sep 2005 15:24 
Subject:Link Error
From:Haines, Charles A. (Hain@NV.DOE.GOV)
Date:09/14/2005 06:54:12 AM
List:com.mysql.lists.plusplus

I know this is a stupid question, but I'm having a brain fart today.

I'm trying to compile and link my application with mysql++. I an doing the following in a make file:

QCC -c -o bin/CounterCard.o src/CounterCard.cpp QCC -I/usr/include -I/usr/lib -I/usr/local/mysql/include -L/usr/lib -L/usr/local/mysql/lib -lm -lsocket -lmysqlpp -lmysqlclient -lz -c -o bin/SFXCounter.o src/SFXCounter.cpp QCC -L/usr/lib -L/usr/local/mysql/lib -lm -lsocket -lmysqlpp -lmysqlclient -lz -o bin/SFXCounter bin/CounterCard.o bin/SFXCounter.o

When the compilter gets to the third line, I am getting the following error:

bin/SFXCounter.o: In function `main': bin/SFXCounter.o(.text+0xa7): undefined reference to `mysqlpp::Connection::Connection(bool)' bin/SFXCounter.o(.text+0x11c): undefined reference to `mysqlpp::Connection::~Connection()' bin/SFXCounter.o(.text+0x27b): undefined reference to `mysqlpp::Connection::~Connection()' bin/SFXCounter.o: In function `connectToDB(mysqlpp::Connection&)': bin/SFXCounter.o(.text+0x3bf): undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned, char, unsigned, char const*, unsigned)' cc: /usr/qnx630/host/qnx6/x86/usr/bin/i386-pc-nto-qnx6.3.0-ld error 1

Usually this is because I'm not linking against the mysqlpp library, but in this case I'm included both it's location and the linking against list. Anyone have any idea what I'm doing wrong? I'm sure it's simple, I just can't think today.

-- Charles Haines Software Engineer / QA Bechtel Nevada Remote Sensing Lab - Andrews

------------------------------ Phone: (301) 817-3409 Pager: (800) 759-8888 #1209278 Email: hain@nv.doe.gov

------------------------------

This e-mail and any attachments may contain privacy act information. If you received this message in error or are not the intended recipient, you should destroy this message and any attachments, and you are prohibited from retaining, distributing, disclosing, or using any information contained herein. Please inform us of the erroneous delivery by return e-mail. Thank you for your cooperation.