Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
Subject: mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Subject: Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
Subject: MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Subject: Re: Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
Annoying question from a noob

Annoying question from a noob

2007-12-02       - By Michael Sullivan

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  

I know you'll hate me for this.  I blame my own inexperience and
ignorance for having to ask this here, but I can't figure out how to
link to mysql++ library.  I emerged mysql++ on my Gentoo system.  I
cannot figure out where it put the example programs, if it even built
them.  I didn't even have the exrun script until I downloaded the source
tarball from the website and built it in my home directory.  I did not
do a make install, as that might conflict with the full-system install
of the package.  The website said that programs that use mysql++ must be
linked with libmysqlpp and libmysqlclient (I did a locate on mysqlclient
and I have mysqlclient_r.so)  Here's the output from my build attempt:

michael@(protected) examples $ g++ simple1.cpp -lmyslpp -lmysqlclient_r
In file included from simple1.cpp:28:
util.h:31:21: error: mysql++.h: No such file or directory
util.h:36: error: expected ',' or '...' before '::' token
util.h:36: error: ISO C++ forbids declaration of 'mysqlpp' with no type
util.h:37: error: expected ',' or '...' before '::' token
util.h:39: error: ISO C++ forbids declaration of 'mysqlpp' with no type
util.h:40: error: variable or field 'print_stock_rows' declared void
util.h:40: error: 'mysqlpp' has not been declared
util.h:40: error: 'res' was not declared in this scope
util.h:41: error: variable or field 'print_stock_table' declared void
util.h:41: error: 'mysqlpp' has not been declared
util.h:41: error: 'query' was not declared in this scope
util.h:42: error: variable or field 'get_stock_table' declared void
util.h:42: error: 'mysqlpp' has not been declared
util.h:42: error: 'query' was not declared in this scope
util.h:42: error: 'mysqlpp' has not been declared
util.h:42: error: 'res' was not declared in this scope
util.h:42: error: initializer expression list treated as compound
expression
util.h:45: error: 'mysqlpp' has not been declared
util.h:45: error: expected ',' or '...' before '&' token
simple1.cpp: In function 'int main(int, char**)':
simple1.cpp:41: error: 'mysqlpp' has not been declared
simple1.cpp:41: error: expected `;' before 'con'
simple1.cpp:42: error: 'con' was not declared in this scope
simple1.cpp:47: error: 'mysqlpp' has not been declared
simple1.cpp:47: error: expected `;' before 'query'
simple1.cpp:48: error: 'query' was not declared in this scope
simple1.cpp:49: error: 'mysqlpp' has not been declared
simple1.cpp:49: error: expected `;' before 'res'
simple1.cpp:53: error: 'res' was not declared in this scope
simple1.cpp:54: error: 'mysqlpp' has not been declared
simple1.cpp:54: error: expected `;' before 'row'
simple1.cpp:55: error: 'mysqlpp' has not been declared
simple1.cpp:55: error: expected `;' before 'i'
simple1.cpp:56: error: 'i' was not declared in this scope
simple1.cpp:56: error: 'row' was not declared in this scope

What am I doing wrong here?


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