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.Dismiss alert
The last command failed, and that's normal because you didn't link with libpqxx. But what went wrong with the first two commands? I don't see any errors.
i can't install it in my mac computer
liyudeMBP:Desktop liyu$ g++ link.cpp -lpqxx -lpq
liyudeMBP:Desktop liyu$ g++ link.cpp -lpqxx -lpq
liyudeMBP:Desktop liyu$ g++ link.cpp -lpq
Undefined symbols for architecture x86_64:
"pqxx::connection_base::disconnect()", referenced from:
_main in link-f6a0e9.o
"pqxx::connection_base::init()", referenced from:
pqxx::basic_connectionpqxx::connect_direct::basic_connection(char const*) in link-f6a0e9.o
"pqxx::connection_base::close()", referenced from:
pqxx::basic_connectionpqxx::connect_direct::~basic_connection() in link-f6a0e9.o
"pqxx::connection_base::dbname()", referenced from:
_main in link-f6a0e9.o
"pqxx::connection_base::connection_base(pqxx::connectionpolicy&)", referenced from:
pqxx::basic_connectionpqxx::connect_direct::basic_connection(char const*) in link-f6a0e9.o
"pqxx::connectionpolicy::connectionpolicy(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
pqxx::connect_direct::connect_direct(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in link-f6a0e9.o
"pqxx::connectionpolicy::~connectionpolicy()", referenced from:
pqxx::connect_direct::~connect_direct() in link-f6a0e9.o
"pqxx::connection_base::is_open() const", referenced from:
_main in link-f6a0e9.o
"vtable for pqxx::connect_direct", referenced from:
pqxx::connect_direct::connect_direct(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in link-f6a0e9.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
liyudeMBP:Desktop liyu$ g++ link.cpp -lpq -lpqxx
it always have some erro please help me !
thanks
The text was updated successfully, but these errors were encountered: