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
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
help... how do i use SSQLS within my own classes...

help... how do i use SSQLS within my own classes...

2006-12-19       - By joh3@(protected)

 Back
Reply:     1     2     3     4     5  

Hi,
  I am hoping that some of you with greater mysql++ and c++ experience can help
me. What I want is to be able to use the SSQLS generated code as part of a
larger object....

FYI...   I can get all the example code to work fine, and i am happy using the
rest of the mysql++ libs but this SSQLS area still has me stuck... anyway any
help would be appreciated.

so my pseudo header code would look something like this...

<<<<file PSmh.h>>>>>

sql_create_8(Target_Region, 1, 0,
   mysqlpp::sql_int, Target_ID,
   string, Target_name,
   string, root_path,
   string, file_path,
   mysqlpp::sql_int, Master_id,
   string, Target_region_geom,
   string, Combined_Amplitude_image_path,
   mysqlpp::sql_int, resume_state)


class PSmh
{/* {{{ */
  // some public methods
private:
   vector<Target_Region> My_target;
}/* }}} */

however.... using this style gives me lots of compile errors.....

g++ -o psinsar logger.cxx Jerr.cxx config-handler.cxx mysql_psinsar_harmony.cxx
psinsar.cxx  -I. -I/usr/include/boost -I/usr/include/stlsoft
-I/usr/include/mysql -g -ggdb -Wall `mysql_config --cflags` -fexceptions
`gsl-config --cflags` `gsl-config --libs` `mysql_config --libs` -L/usr/lib/ -l
mysqlpp  -L/lib -L/usr/lib -lz -lm -lboost_program_options -L.

/tmp/ccc67q0l.o:/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/exception
:55:
multiple definition of `Target_Region::names'

/tmp/ccsfwwq0.o:/usr/include/mysql++/lockable.h:139: first defined here

/tmp/ccc67q0l.o:/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iostream:78:
multiple definition of `Target_Region::_table'

/tmp/ccsfwwq0.o:/usr/include/mysql++/noexceptions.h:60: first defined here

collect2: ld returned 1 exit status

make: *** [psinsar] Error 1

can someone give me some hints how i can get this working?


also i need to extend the mysql++ library to use the geospatial mysql
extensions, i am slowly working out how mysql++ all fits together, would you
like patches to make them work if i can get it working? if so how do i submit
them? should they be against the svn code or the base mysql++ 2.1.1 code?

thanks in advance for all your help, and merry christmas

Cheers

  Joe


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