[Libpqxx-general] Unnamed prepared statements vs PQexecParams
Jeroen Vermeulen
jtv at xs4all.nl
Fri Oct 16 00:30:44 UTC 2009
Trigve Siver wrote:
>> Made some pretty radical changes after all, but support is in trunk now.
> I've tried to compile my code with new svn and got unresolved symbol:
>
> unresolved external symbol "public: class pqxx::internal::parameterized_invocation __thiscall pqxx::transaction_base::parameterized(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"
>
> Don't know why. I link statically.
That means PQXX_HAVE_PQEXECPARAMS hasn't been defined in
include/pqxx/config-internal-libpq.h. Thus the build doesn't "know"
that your libpq version supports PQexecParams().
In that case, I opted to suppress the definition of parameterized() so
you can't build a program that uses parameterized statements on libpq
versions that don't. I would like to suppress the declaration as well,
so you get a compile error instead of a link error, but that would
require exposing the libpq feature macro directly to the client program.
Jeroen
More information about the Libpqxx-general
mailing list