List:MySQL++« Previous MessageNext Message »
From:joh3@lithophile.com Date:December 20 2006 4:19am
Subject:help... how do i use SSQLS within my own classes...
View as plain text  
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

Thread
help... how do i use SSQLS within my own classes...joh3@lithophile.com20 Dec
  • RE: help... how do i use SSQLS within my own classes...Joel Fielder20 Dec
  • Re: help... how do i use SSQLS within my own classes...Warren Young20 Dec
    • Re: help... how do i use SSQLS within my own classes...joh3@lithophile.com20 Dec
      • Re: help... how do i use SSQLS within my own classes...Warren Young20 Dec