Hi Rene,
Rene Engelhard wrote:
{ please CC me, not subscribed to d...@dba }
Hi,
first of all: Andrey, *if* you update the code, please leave the conditionals
in makefile.mk for SYSTEM_MYSQL intact. i.e. just not copy your new stuff based
on the old one over. thanks. :-(
I readded it.
sorry about that. I did not merge the code just copied it over, did not
know there were changes to any files which I will overwrite.
I also (temporarily) added a MYSQL_LIB+=-lmysqlcppconn for the system-mysql
case.
(And changed the header check in configure.in).
nice!
Now, I ran into an other problem: we need delzip in the dir, says dmake:
committed
delzip there, too.
yeah, I noticed that but forgot to commit it.
I also added this patch:
Index: mysqlc_driver.cxx
===================================================================
--- mysqlc_driver.cxx (Revision 265375)
+++ mysqlc_driver.cxx (Arbeitskopie)
@@ -37,7 +37,11 @@
using ::rtl::OUString;
#include <stdio.h>
+#ifdef SYSTEM_MYSQL
+#include "cppconn/mysql_driver.h"
+#else
#include "driver/mysql_driver.h"
+#endif
#undef OSL_TRACE
#define OSL_TRACE(msg) printf("%s\n", (msg))
as the include - currently at least - is not found otherwise.
the structure is a bit different, at least what I used locally for
development :
mysqlc\
\----driver
\-------- cppconn\ (headers)
\-------- mysql\ (headers)
\ mysql_connection.cpp
...
Now the question in this mail (I hacked around it to get further, the oxt
builds at least):
I get the following build error:
Making: ../../../unxlngppc.pro/slo/mysqlc_preparedstatement.obj
g++ -fsigned-char -fmessage-length=0 -c -Os -fno-strict-aliasing
-DSYSTEM_MYSQL -I../../inc -I/usr/include/mysql -DMYSQLC_VERSION_MAJOR=1
-DMYSQLC_VERSION_MINOR=0 -DMYSQLC_VERSION_MICRO=2 -DBIG_JOINS=1
-fPIC -I. -I../../../unxlngppc.pro/inc/mysqlc -I../inc -I../../../inc/pch
-I../../../inc -I../../../unx/inc -I../../../unxlngppc.pro/inc -I.
-I/home/rene/OpenOffice.org/cws/mysqlnative/solver/300/unxlngppc.pro/inc/stl
-I/home/rene/OpenOffice.org/cws/mysqlnative/solver/300/unxlngppc.pro/inc/external
-I/home/rene/OpenOffice.org/cws/mysqlnative/solver/300/unxlngppc.pro/inc
-I/home/rene/OpenOffice.org/cws/mysqlnative/solenv/unxlngppc/inc
-I/home/rene/OpenOffice.org/cws/mysqlnative/solenv/inc
-I/home/rene/OpenOffice.org/cws/mysqlnative/res
-I/home/rene/OpenOffice.org/cws/mysqlnative/solver/300/unxlngppc.pro/inc/stl
-I/home/rene/OpenOffice.org/cws/mysqlnative/solenv/inc/Xp31
-INO_JAVA_HOME/include -INO_JAVA_HOME/include/linux
-INO_JAVA_HOME/include/native_
threads/include -I/usr/include
-I/home/rene/OpenOffice.org/cws/mysqlnative/solver/300/unxlngppc.pro/inc/offuh
-I. -I../../../res -I. -fsigned-char -pipe -frtti -Wno-ctor-dtor-privacy
-fPIC -DLINUX -DUNX -DVCL -DGCC -DC300 -DPOWERPC -DCVER=C300 -DNPTL -DGLIBC=2
-D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400
-DPOWERPC -DPPC -DHAVE_GCC_VISIBILITY_FEATURE -D__DMAKE -DUNIX -DCPPU_ENV=gcc3
-DGXX_INCLUDE_PATH=/usr/include/c++/4.3 -DSUPD=300 -DPRODUCT -DNDEBUG
-DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DCUI -DSHAREDLIB -D_DLL_
-fexceptions -fno-enforce-eh-specs -DEXCEPTIONS_ON -o
../../../unxlngppc.pro/slo/mysqlc_preparedstatement.o
/home/rene/OpenOffice.org/cws/mysqlnative/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
/home/rene/OpenOffice.org/cws/mysqlnative/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx:72:1:
warning: "OSL_TRACE" redefined
In file included from
/home/rene/OpenOffice.org/cws/mysqlnative/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx:33:
/home/rene/OpenOffice.org/cws/mysqlnative/solver/300/unxlngppc.pro/inc/osl/diagnose.h:84:1:
warning: this is the location of the previous definition
In file included from
/home/rene/OpenOffice.org/cws/mysqlnative/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.hxx:33,
from
/home/rene/OpenOffice.org/cws/mysqlnative/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx:35:
/home/rene/OpenOffice.org/cws/mysqlnative/connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx:83:
warning: declaration 'struct sql::ResultSet' does not declare anything
/home/rene/OpenOffice.org/cws/mysqlnative/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx:
In constructor
'connectivity::mysqlc::OPreparedStatement::OPreparedStatement(connectivity::mysqlc::OConnection*,
sql::PreparedStatement*)':
/home/rene/OpenOffice.org/cws/mysqlnative/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx:96:
error: passing 'const sql::ParameterMetaData' as 'this' argument of 'virtual
int sql::ParameterMetaData::getParameterCount()' discards qualifiers
/home/rene/OpenOffice.org/cws/mysqlnative/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx:
In member function 'virtual void
connectivity::mysqlc::OPreparedStatement::setNull(sal_Int32, sal_Int32)':
/home/rene/OpenOffice.org/cws/mysqlnative/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx:464:
error: 'class sql::PreparedStatement' has no member named 'setNull'
dmake: Error code 1, while making
'../../../unxlngppc.pro/slo/mysqlc_preparedstatement.obj'
You are using old version of cppconn. It changes constantly, the API.
Although, I think the API has been mostly stabilized (got rid of some
consts). To get latest sources :
bzr branch lp:~mysql/mysql-connector-cpp/trunk
Grüße/Regards,
René
Best,
Andrey
--
Andrey Hristov, Connectors Software Developer, Database Group
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org