Thread: New CVS doesn't compile

New CVS doesn't compile

From
"Johann Zuschlag"
Date:
Hi,

I just retrieved the new CVS. When I try to compile it (VC++ 5.0), I get the following errors:

1. just a warning, 'updret', unreferenced local variable
2. info.obj: error LNK2001, unresolved external symbol _PGAPI_GETInfo30@20

Line 685 in info.c should be changed from:

return PGAPI_GetInfo30(hdbc, fInfoType, rgbInfoValue, cbInfoValueMax,pcbInfoValue);

to:

return PGAPI_GetInfo(hdbc, fInfoType, rgbInfoValue, cbInfoValueMax,pcbInfoValue);

regards

Johann


Johann Zuschlag
zuschlag2@online.de



Re: New CVS doesn't compile

From
Hiroshi Inoue
Date:
Johann Zuschlag wrote:
>
> Hi,
>
> I just retrieved the new CVS. When I try to compile it (VC++ 5.0), I get the following errors:
>
> 1. just a warning, 'updret', unreferenced local variable
> 2. info.obj: error LNK2001, unresolved external symbol _PGAPI_GETInfo30@20
>

Hmm you don't seem to be linking odbcapi30.obj.

> Line 685 in info.c should be changed from:
>

No. PGAPI_GetInfo() is also the caller and your change
causes a recursive call.

> return PGAPI_GetInfo30(hdbc, fInfoType, rgbInfoValue, cbInfoValueMax,pcbInfoValue);
>
> to:
>
> return PGAPI_GetInfo(hdbc, fInfoType, rgbInfoValue, cbInfoValueMax,pcbInfoValue);
>

regards,
Hiroshi Inoue

Re: New CVS doesn't compile

From
Tom Lane
Date:
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> Johann Zuschlag wrote:
>> I just retrieved the new CVS. When I try to compile it (VC++ 5.0), I get the following errors:

> Hmm you don't seem to be linking odbcapi30.obj.

Which is unsurprising considering that the currently-committed
odbc/GNUmakefile doesn't call for it.

I just retrieved current CVS of interfaces/odbc, and I can report that
it doesn't even begin to compile on Unix: there are literally thousands
of lines of error reports.  The major problem seems to be that there is
no definition anywhere for SQLRETURN, so pgapifunc.h is completely broken.

Perhaps you forgot to commit some changes that you have locally?

            regards, tom lane

Re: New CVS doesn't compile

From
Hiroshi Inoue
Date:
Tom Lane wrote:
>
> Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > Johann Zuschlag wrote:
> >> I just retrieved the new CVS. When I try to compile it (VC++ 5.0), I get the following errors:
>
> > Hmm you don't seem to be linking odbcapi30.obj.
>
> Which is unsurprising considering that the currently-committed
> odbc/GNUmakefile doesn't call for it.

He is compiling under Windows because he uses VC++.
I may have taken a mistake in changing win32.mak too.

>
> I just retrieved current CVS of interfaces/odbc, and I can report that
> it doesn't even begin to compile on Unix: there are literally thousands
> of lines of error reports.  The major problem seems to be that there is
> no definition anywhere for SQLRETURN, so pgapifunc.h is completely broken.

Oops sorry, I didn't think someone would try to complie on UNIX
at once. OK I would fix the compile error.

regards,
Hiroshi Inoue

Re: New CVS doesn't compile

From
Hiroshi Inoue
Date:
I wrote:
>
> Tom Lane wrote:
> >
> > Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > > Johann Zuschlag wrote:
> > >> I just retrieved the new CVS. When I try to compile it (VC++ 5.0), I get the following errors:
> >
> > > Hmm you don't seem to be linking odbcapi30.obj.
> >
> > Which is unsurprising considering that the currently-committed
> > odbc/GNUmakefile doesn't call for it.
>
> He is compiling under Windows because he uses VC++.
> I may have taken a mistake in changing win32.mak too.
>

nmake /f win32.mak  seems to work here.
Johann, please add odbcapi.c and odbcapi.c to your project
if you are working on your own project.
Oh please don't forget to download the latest snapshot
before doing it.

> > I just retrieved current CVS of interfaces/odbc, and I can report that
> > it doesn't even begin to compile on Unix: there are literally thousands
> > of lines of error reports.  The major problem seems to be that there is
> > no definition anywhere for SQLRETURN, so pgapifunc.h is completely broken.
>
> Oops sorry, I didn't think someone would try to complie on UNIX
> at once. OK I would fix the compile error.

I've just fixed those errors at least on linux and cygwin
though I don't guarantee the driver to work in reality.

regards,
Hiroshi Inoue

Re: New CVS doesn't compile

From
"Johann Zuschlag"
Date:
On Tue, 21 Aug 2001 08:24:55 +0900, Hiroshi Inoue wrote:

>Hmm you don't seem to be linking odbcapi30.obj.

Oh, I forgot a bunch of new Files in my project.

>
>> Line 685 in info.c should be changed from:
>>
>
>No. PGAPI_GetInfo() is also the caller and your change
>causes a recursive call.

Oops, I just realized that.

regards

Johann Zuschlag
zuschlag2@online.de






Re: New CVS doesn't compile

From
"Johann Zuschlag"
Date:
On Tue, 21 Aug 2001 17:51:19 +0900, Hiroshi Inoue wrote:

>nmake /f win32.mak  seems to work here.
>Johann, please add odbcapi.c and odbcapi.c to your project
>if you are working on your own project.

Thanks, I already found out.

>Oh please don't forget to download the latest snapshot
>before doing it.
>

Ok, did it. I had to switch to a VC 6.0 (Author Version unfortunately). Since in sql/-text.h
some definitions are missing. Now it compiles fine. I only get some warnings in
drvconn.c and setup.c (warning C4028 and warning C4024). I didn't get these
in VC 5.0. Maybe I switch back and just add the new definition files.

So far the snapshot seems to be stable. Have to do further testing.
One thing I found: certain queries are faster now.

regards,


Johann Zuschlag
zuschlag2@online.de