The problem seems to be binutils version 2.14.90. Jonathan Wakely
recommends to upgrade to 2.15.92, then re-compile gcc 3.4.3. I don't know
if gcc 4.0 still has this problem; it may require a later version of
binutils than 2.14.90. Anyway, I've requested an upgrade of binutils, and
this *may* fix the problem.
Thanks,
Dale Smith, Ph.D.
dalesmith@stripped
DTCC Risk Management
Quantitative Group
212-855-7641
Chris Frey <cdfrey@stripped>
06/12/2005 05:20 AM
To
plusplus@stripped
cc
Subject
Re: Link errors with resetdb example program
On Fri, Jun 10, 2005 at 03:32:07PM -0600, Warren Young wrote:
> Can you now try linking a basic "hello, world" type program against
> libmysql++? If you have to include something in the program to make
> sure it uses the library, use something peripheral within the library,
> like string2stream, or some of the primitive C type stuff in convert.h.
> You might find the #include graphs in the reference manual helpful
> here: choose something that doesn't eventually depend on query.h, or
> even row.h, connection.h, or coldata.h.
I'd recommend using the same program that Jonathan Wakely used in that
earlier thread Warren posted:
http://gcc.gnu.org/ml/libstdc++/2004-09/msg00125.html
#include <istream>
#include <ostream>
template <typename C>
class Test : public std::basic_iostream<C>
{
public:
Test() : std::basic_iostream<C>(0) {}
};
#include <iostream>
int main()
{
Test<char> t;
std::cout << '\n';
}
The iostream classes were designed with inheritance in mind, so inheriting
(and the destructors) shouldn't cause a problem.
> If the changes to Query will happen, it will
> happen during the v2.0 development. It is not yet certain that it will
> happen, because all known problems presently have reasonable
> workarounds. So far, the best reason I have to change it is that Scott
> Meyers said so. Not the best reason...
The reason to get rid of stream inheritance would be the copying that
Query objects might do, not the inheritance itself. And these link errors
all reference the destructor, which doesn't have anything to do with
copying, in my opinion.
Has anyone emailed Jonathan Wakely? Maybe he would remember what he did
to fix his problem. The thread doesn't seem to finish completely.
- Chris
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsub=1