You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
jtv / libpqxx Public
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi everyone,
I'm having problems testing the library, I'm getting the following error:
test_escape.o: In function `pqxx::internal::PQAlloc::loseref()': /libpqxx-master/test/unit/../../include/pqxx/util.hxx:609: undefined reference to `pqxx::internal::clear_result(pg_result const*)'
What I did to build the library was:
./configure --prefix=/usr/local --enable-shared
make -j8
sudo make install
The text was updated successfully, but these errors were encountered:
jtv closed this as completed Sep 9, 2017 scottfurry commented Oct 18, 2017Apologies for resurrecting this thread, but it seems rather pertinent to my current situation.
I'm updating code that uses libpqxx but linking fails.
libpq ver 9.6.5 build date 2017Sep06
libpqxx ver 5.1.0 build date 2017Aug03
I don't see the "PQAlloc" notice, but I receive numerous linking errors stating "undefined reference to `pqxx::internal::clear_result(pg_result const*)'". Can you clarify, please.
scottfurry mentioned this issue Oct 18, 2017 jtv commented Oct 19, 2017Ah, this may be that problem where I forgot to export clear_result ! It's fixed in 6.0, but obviously that won't help 5.1.
In include/pqxx/result.hxx, try prefixing the clear_result declaration with PQXX_LIBEXPORT . So it becomes:
PQXX_LIBEXPORT void clear_result(const pq::PGresult *);
I believe this problem shows up only when linking dynamically against libpqxx. It may be safer to link statically — it's just so easy to sneak in a binary-incompatible change in C++!
scottfurry commented Oct 19, 2017I had already tried changing the line in include/pqxx/result.hxx without success.
This lead to creating issue #33.
Hopefully the newly pushed 5.1 branch and updated 5.1.1 tag will solve this.
scottfurry commented Oct 22, 2017Yes - version bump solved the problem is it caught the change.
3 participants© 2024 GitHub, Inc.
You can’t perform that action at this time.