On Mon, Jun 07, 2021 at 10:38:03AM -0400, Tom Lane wrote:
> Hmm. We do include "-lpgcommon -lpgport" when building the ecpg test
> programs on Unix, so I'd assumed that the MSVC scripts did the same.
> Is there a good reason not to make them do so?
I was looking at that this morning, and yes we need to add more
references here. Actually, adding only libpgport.lib allows the
compilation and the tests to work, but I agree to add also
libpgcommon.lib so as we don't fall into the same compilation trap
again in the future.
Now, I also see that using pgwin32_setenv() instead of
src/port/setenv.c causes cl to be confused once we update
ecpg_regression.proj because it cannot find setenv(). Bringing the
question, why is it necessary to have both setenv.c and
pgwin32_setenv() on HEAD? setenv.c should be enough once you have the
fallback implementation of putenv() available.
Attached is the patch I am finishing with, that also brings all this
stuff closer to what I did in 12 and 13 for hamerkop. The failing
test is passing for me now with MSVC and GSSAPI builds.
Thoughts?
--
Michael