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()
 
Subject: linking problems with SSQLS

Subject: linking problems with SSQLS

2007-10-11       - By joh3@(protected)

 Back
Hi,
  Having struggled with this for a day now i am asking for help from the wider
community, my code worked fine creating ssqls structures and stuff, it was only
when i tried to use mysql++ SSQLS features in code like this that i get linking
errors....

>>>>>>>>>>
  mysqlpp::Query query = con.query();
  query.reset();
   for( iter = ps_mysql_harmony_common_data.file_types_vector.begin(); iter !=
ps_mysql_harmony_common_data.file_types_vector.end(); iter++ )
   {
     query.insert(*iter);
   };
<<<<<<<<<<

this causes my compilation to fail along these lines...

/export/sda4/svn/PS_code/src/table_construct.h:42: undefined reference to
`File_Types::names'

i include a more verbose error listing, and my g++ compile line at the base of
this email.

  If anyone can point out where i am going wrong i really would greatly
appreciate it! the example code builds fine, so its blatantly something i am
doing wrong and not mysql++'s fault.

  Thanks in advance

    Joe

Linking error.........

/tmp/ccS0Mujl.o: In function `File_Types::table()':
/export/sda4/svn/PS_code/src/table_construct.h:42: undefined reference to
`File_Types::_table'

/tmp/ccS0Mujl.o: In function `std::basic_ostream<char, std::char_traits<char> >&
operator<< <mysqlpp::do_nothing_type0>(std::basic_ostream<char,
std::char_traits<char> >&, File_Types_field_list<mysqlpp::do_nothing_type0>
const&)':

/export/sda4/svn/PS_code/src/table_construct.h:42: undefined reference to
`File_Types::names'
/export/sda4/svn/PS_code/src/table_construct.h:42: undefined reference to
`File_Types::names'
/export/sda4/svn/PS_code/src/table_construct.h:42: undefined reference to
`File_Types::names'
/export/sda4/svn/PS_code/src/table_construct.h:42: undefined reference to
`File_Types::names'

at the moment i use a g++ line like this (generated by a makefile)

g++ -o psinsar.bin `pwd`/src/config-handler.cxx
`pwd`/src/mysql_psinsar_harmony.cxx `pwd`/src/ps_process_class.cxx
`pwd`/src/File_Types_plugin/file_types_bottle.cxx `pwd`/src/table_construct.h
`pwd`/src/psinsar.cxx  `pwd`/obj/logger.o `pwd`/obj/logger_bottle.o
`pwd`/obj/message_center.o `pwd`/obj/plugin_abc.o
`pwd`/obj/config_handler_bottle.o `pwd`/obj/jerr.o `pwd`/obj/debug_log_class.o
`pwd`/obj/plugin_factory.o  `pwd`/obj/mysql_psinsar_harmony_bottle.o
`pwd`/obj/asf_aisp_bottle.o   -g -ggdb -Wall  -fexceptions `mysql_config
--cflags` `gsl-config --cflags`   `perl -MExtUtils::Embed -e ccopts | sed
's/-Wdeclaration-after-statement//g'`  -DPERL_NO_SHORT_NAMES  -I
/export/sda4/svn/PS_code/external_code/mysqlpp/mysql++-2.3.2/lib
-fmessage-length=0    -I`pwd`/include/external -I`pwd`/include/native
-I`pwd`/obj -I`pwd`/src -I . -I/usr/include/boost -I/usr/include/stlsoft
-I`mysql_config --include`   `perl -MExtUtils::Embed -e ldopts `
-L`pwd`/libs/external -L`pwd`/libs/native -L/lib -L/usr/lib -L.
-lboost_program_options -lboost_filesystem -lboost_regex   -lc -lz -lm  -lEP
`gsl-config --libs`  -lmysqlpp_util    `mysql_config --libs` -lmysqlpp -ldl



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