List:MySQL++« Previous MessageNext Message »
From:Totte Karlsson Date:August 19 2004 11:39pm
Subject:Re: dll problems with borland 6
View as plain text  
OK, I got it compiled and I can run a simple example. The exception that
occured before seems to be gone now.

To get the code to compile I had to do several changes

1) In ColData.cc I added
#include <windows.h>

2) In row.hh
    The compiler had a problem with the following line (line 249 in row1.hh)
    data.insert(data.end(),(d[i]) ? std::string(d[i],jj[i]) :
(std::string)"NULL");

giving the following errors
[C++ Error] row1.hh(249): E2357 Reference initialized with '_STL::string',
needs lvalue of type '_STL::string'
[C++ Error] row1.hh(249): E2342 Type mismatch in parameter '__s' (wanted
'const _STL::string &', got '_STL::string')

I rewrote it to read
    data.insert(data.end(), (d[i] ? std::string(d[i], jj[i]) :
std::string("NULL")) );
i.e. the problem had to do with operator precedence, I guess.

3) In each .cc file that had
#include <Windows32/Base.h>
#include <Windows32/Defines.h>
#include <Windows32/Structures.h>

the lines where changed to
//#include <Windows32/Base.h>
//#include <Windows32/Defines.h>
//#include <Windows32/Structures.h>
i.e. the headers was simply commented out.. don't know what they are doing,
but they are not provided by the borland distribution.

3)
the header include
#include <ext/slist>
in connection.hh
was changed to
#include <slist>


4)
in convert.hh
the lines
mysql__convert(float, strtod)
mysql__convert(double, strtod)
mysql__convert(char, strtol)
mysql__convert(signed char, strtol)
mysql__convert(int, strtol)
mysql__convert(short int, strtol)
mysql__convert(long int, strtol)
mysql__convert(unsigned char, strtoul)
mysql__convert(unsigned int, strtoul)
mysql__convert(unsigned short int, strtoul)
mysql__convert(unsigned long int, strtoul)

were changed into

mysql__convert(float, std::strtod)
mysql__convert(double, std::strtod)
mysql__convert(char, std::strtol)
mysql__convert(signed char, std::strtol)
mysql__convert(int, std::strtol)
mysql__convert(short int, std::strtol)
mysql__convert(long int, std::strtol)
mysql__convert(unsigned char, std::strtoul)
mysql__convert(unsigned int, std::strtoul)
mysql__convert(unsigned short int, std::strtoul)
mysql__convert(unsigned long int, std::strtoul)

Maing the above changes allow for compilation into a static .lib file.
However, there are some severe(?) warnings:
Build
  [C++ Warning] coldata3.hh(8): W8017 Redefinition of 'errno' is not
identical
  [C++ Warning] null1.hh(16): W8058 Cannot create pre-compiled header:
initialized data in header
  [C++ Warning] connection1.hh(8): W8017 Redefinition of 'errno' is not
identical
  [C++ Warning] null1.hh(16): W8058 Cannot create pre-compiled header:
initialized data in header
  [C++ Warning] datetime.cc(13): W8017 Redefinition of 'errno' is not
identical
  [C++ Warning] null1.hh(16): W8058 Cannot create pre-compiled header:
initialized data in header
  [C++ Warning] field_names.cc(12): W8017 Redefinition of 'errno' is not
identical
  [C++ Warning] null1.hh(16): W8058 Cannot create pre-compiled header:
initialized data in header
  [C++ Warning] field_types.cc(12): W8017 Redefinition of 'errno' is not
identical
  [C++ Warning] null1.hh(16): W8058 Cannot create pre-compiled header:
initialized data in header
  [C++ Warning] manip1.hh(9): W8017 Redefinition of 'errno' is not identical
  [C++ Warning] null1.hh(16): W8058 Cannot create pre-compiled header:
initialized data in header
  [C++ Warning] query1.hh(8): W8017 Redefinition of 'errno' is not identical
  [C++ Warning] null1.hh(16): W8058 Cannot create pre-compiled header:
initialized data in header
  [C++ Warning] connection1.hh(8): W8017 Redefinition of 'errno' is not
identical
  [C++ Warning] null1.hh(16): W8058 Cannot create pre-compiled header:
initialized data in header
  [C++ Warning] set1.hh(9): W8017 Redefinition of 'errno' is not identical
  [C++ Warning] null1.hh(16): W8058 Cannot create pre-compiled header:
initialized data in header
  [C++ Warning] sql_query.cc(13): W8017 Redefinition of 'errno' is not
identical
  [C++ Warning] type_info1.hh(8): W8017 Redefinition of 'errno' is not
identical
  [C++ Warning] null1.hh(16): W8058 Cannot create pre-compiled header:
initialized data in header
  [C++ Warning] manip1.hh(9): W8017 Redefinition of 'errno' is not identical
  [C++ Warning] null1.hh(16): W8058 Cannot create pre-compiled header:
initialized data in header
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'connection' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'connection' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'connection' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'connection' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'connection' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'datetime' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'datetime' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'datetime' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_names'
clashes with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_names'
clashes with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_names'
clashes with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_names'
clashes with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_names'
clashes with prior module 'coldata'
  [TLib Warning] public '_STL::find<const ...' in module 'field_names'
clashes with prior module 'connection'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_names'
clashes with prior module 'connection'
  [TLib Warning] public '_STL::operator +(const char*,const
_STL::basic_string<_STL::char_traits<...' in module 'field_names' clashes
with prior module 'connection'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_types'
clashes with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_types'
clashes with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_types'
clashes with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_types'
clashes with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_types'
clashes with prior module 'coldata'
  [TLib Warning] public '_STL::find<const ...' in module 'field_types'
clashes with prior module 'connection'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'field_types'
clashes with prior module 'connection'
  [TLib Warning] public '_STL::operator +(const char*,const
_STL::basic_string<_STL::char_traits<...' in module 'field_types' clashes
with prior module 'connection'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'manip' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'manip' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'manip' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'manip' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'query' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'query' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'query' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'query' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'query' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::find<const ...' in module 'query' clashes
with prior module 'connection'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'query' clashes with
prior module 'connection'
  [TLib Warning] public '_STL::operator +(const char*,const
_STL::basic_string<_STL::char_traits<...' in module 'query' clashes with
prior module 'connection'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'result' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'result' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'result' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'result' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'result' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::find<const ...' in module 'result' clashes
with prior module 'connection'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'result' clashes
with prior module 'connection'
  [TLib Warning] public '_STL::operator +(const char*,const
_STL::basic_string<_STL::char_traits<...' in module 'result' clashes with
prior module 'connection'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'set' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'set' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'set' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'set' clashes with
prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'type_info' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'type_info' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'type_info' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'type_info' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'type_info' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'vallist' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'vallist' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'vallist' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'vallist' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'vallist' clashes
with prior module 'coldata'
  [TLib Warning] public '_STL::operator
<<(_STL::basic_ostream<_STL::char_traits<...' in module 'vallist' clashes
with prior module 'connection'
  [TLib Warning] public '_STL::operator +(const char*,const
_STL::basic_string<_STL::char_traits<...' in module 'vallist' clashes with
prior module 'connection'


"Warren Young" <mysqlpp@stripped> wrote in message
news:4125195D.2050705@ style="color:#666">stripped...
> Most of the *.hh files in that directory are
> indeed used only internally by the library, while a few expose the
> public interfaces to the library.

The README file in this directory is misleading.
The first sentence says
    "All of the header files in this dir (sqlplusint) are internal.  This
    means that you should never include any of these directly in your
    programs as they are subject to change from one relese to another."

However, the mysql++.hh header is there and I guess anyone using this
library has to include this one. Any newcomber to this library will ask the
same question as I did. Therefore, I think that the README file should be
changed.

I got the sources to compile but of course it is not tested. If you want I
can send you the borland project files and the sourcefiles in sqlplusint.
Please let me know.

regards totte



Thread
dll problems with borland 6Totte Karlsson19 Aug
  • Re: dll problems with borland 6Warren Young19 Aug
  • Re: dll problems with borland 6Totte Karlsson19 Aug
    • Re: dll problems with borland 6Warren Young19 Aug
  • Re: dll problems with borland 6Totte Karlsson20 Aug
    • Re: dll problems with borland 6Warren Young20 Aug
  • Re: dll problems with borland 6Totte Karlsson20 Aug
    • Re: dll problems with borland 6Warren Young20 Aug
  • Re: mysql++ on sourceforgeSteffen Neumann26 Oct
  • Re: mysql++ on sourceforgePaolo Brandoli26 Oct