Hi,
I went ahead and had a go compiling DTL under gcc 4.1.2 on redhat
linux and got the same error. This is just gcc being stupid and not
recognizing member functions inside of a template. The lines you are
getting this error for look like:
setstate(this->badbit)
change them to
this->setstate(this->badbit)
and the error will go away.
I got a couple other minor syntax errors related to the fact that I am
running a 64 bit version so that I needed to change SetStmtAttrs to
take a SQLPointer for the 2nd argument (the value argument) rather
than SDWORD which is what I had previously. I will try to post a
minor release with these changes next week since there have been a
couple questions on the forum about running DTL under 64bit linux.
Corwin
--- In DatabaseTemplateLibrary@yahoogroups.com, "buschnick"
<Soeren.Meyer-Eppler@...> wrote:
>
> This is a repost since my first message two weeks ago seems to have
> been swallowed by the moderation queue or something.
>
> I'm trying to compile the DTL 3.6.10 on ubuntu linux with gcc 4.2.1 (I
> have tried several older versions as well). The process chokes on two
> errors though. The first one was easy enough to fix, it was just a
> repetition of the classname in a function declaration in a header.
> Something that AFAIK is simply redundant but legal C++.
>
> However, the second error completely baffles me as the error message
> doesn't seem to have anything to do with reality. gcc complains it
> cannot convert parameter one from int to char * for function "char *
> setstate( char *)". This is _not_ the function declaration from the
> dtl headers, but a global function from cstdlib or math. So it seems
> gcc is messing up the name lookup or something and finds an incorrect
> function declaration. If I rename the dtl's setstate method to
> setstate_dtl the error changes to something else, indicating that gcc
> indeed can't find the method declaration at all. The necessary header
> "DB_base.h" is included though.
>
> Question: did anyone else run into this problem? How can I fix this?
> It is quite important for us to get a linux build of our product
> working and the dtl is the last thing stopping us... So thank you for
> any tips/pointers.
>
> regards,
>
> Sören
>