Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Link Error: msg#00042

db.mysql.c++

Subject: Link Error

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: hainesca@xxxxxxxxxx
------------------------------

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.


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
solaris.opensol...    editors.vim/200...    web.turbogears....    jakarta.ant.dev...    mathematics.max...    text.unicode.ge...    lang.ruby.core/...    xfce.announce/2...    network.centeri...    php.cvs.pear/20...    user-groups.lin...    kde.devel.quant...    file-systems.ar...    redhat.fedora.t...    apple.fink.auto...    gnome.orbit.gen...    qplus.devel/200...    culture.transpo...    video.dri.user/...    operators.nanog...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation