List:MySQL++« Previous MessageNext Message » Date:October 11 2007 11:10pm
Subject:linking problems with SSQLS
View as plain text  
	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

 	mysqlpp::Query query = con.query();
	  for( iter = ps_mysql_harmony_common_data.file_types_vector.begin(); iter !=
ps_mysql_harmony_common_data.file_types_vector.end(); iter++ )

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

/export/sda4/svn/PS_code/src/table_construct.h:42: undefined reference to

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


Linking error.........

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

/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> >&,

/export/sda4/svn/PS_code/src/table_construct.h:42: undefined reference to
/export/sda4/svn/PS_code/src/table_construct.h:42: undefined reference to
/export/sda4/svn/PS_code/src/table_construct.h:42: undefined reference to
/export/sda4/svn/PS_code/src/table_construct.h:42: undefined reference to

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
-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

linking problems with SSQLSjoh3@lithophile.com12 Oct
  • Re: linking problems with SSQLSWarren Young12 Oct
    • Re: linking problems with SSQLSjoh3@lithophile.com16 Oct