Closed Nosferatu13666 closed 5 months ago
I can't reproduce this by adding
diff --git a/tests/postgresql/test-postgresql.cpp b/tests/postgresql/test-postgresql.cpp
index 65168586..81ffe432 100644
--- a/tests/postgresql/test-postgresql.cpp
+++ b/tests/postgresql/test-postgresql.cpp
@@ -1435,5 +1435,6 @@ int main(int argc, char** argv)
test_context tc(backEnd, connectString);
+ postgresql_soci_error e("postgresql_soci_error", "foo"); e.sqlstate();
return Catch::Session().run(argc, argv);
}
to the test so I can only suppose you're not linking with the right library (libsoci_postgresql.so
).
Its done. I forgot to link "Soci_postgresql_PLUGIN" in cmake Thanks!
I'm trying to use sqlstate on ubuntu, making with cmake:
catch (soci::postgresql_soci_error const & e) { std::cout << e.sqlstate() << std::endl; }
There is an error: undefined reference to «soci::postgresql_soci_error::sqlstate[abi:cxx11]() const»
Other functions are work. I tryed make Soci with static build, dynamic build, both - no effect, the same error. How to fix problem?