Cross compile of the pqxx in c++ for arm7

  Kiến thức lập trình

I want to use the library libpqxx in my plc next project, and i used the toolchain of the plc next and after i followed the instructions how to build my library:

$env:ARP_TOOLCHAIN_ROOT = “C:/SDKs/AXCF2152/2024.0”

cd C:Librarieslibpqxxbuild_arm
cmake -DCMAKE_TOOLCHAIN_FILE=C:/SDKs/AXCF2152/2024.0/toolchain.cmake -DCMAKE_INSTALL_PREFIX=C:/Libraries/libpqxx_arm -DPostgreSQL_INCLUDE_DIR=”C:/Program Files/PostgreSQL/16/include” -DPostgreSQL_LIBRARY=”C:/Program Files/PostgreSQL/16/lib/libpq.lib” ..

cmake –build . –config Release

After the last command i got this at the end:

libpqxx-7.9.a(connection.obj) : error LNK2019: unresolved external symbol __imp_ioctlsocket referenced in function “pub
lic: void __cdecl pqxx::connection::set_blocking(bool)& ” (?set_blocking@connection@pqxx@@QEGAAX_N@Z) [C:Librarieslib
pqxxbuild_armtestrunner.vcxproj]
libpqxx-7.9.a(connection.obj) : error LNK2019: unresolved external symbol __imp_WSAGetLastError referenced in function
“public: void __cdecl pqxx::connection::set_blocking(bool)& ” (?set_blocking@connection@pqxx@@QEGAAX_N@Z) [C:Libraries
libpqxxbuild_armtestrunner.vcxproj]
libpqxx-7.9.a(wait.obj) : error LNK2001: unresolved external symbol __imp_WSAGetLastError [C:Librarieslibpqxxbuild_a
rmtestrunner.vcxproj]
libpqxx-7.9.a(wait.obj) : error LNK2019: unresolved external symbol __imp_WSAPoll referenced in function “void __cdecl
pqxx::internal::wait_fd(int,bool,bool,unsigned int,unsigned int)” (?wait_fd@internal@pqxx@@YAXH_N0II@Z) [C:Librariesl
ibpqxxbuild_armtestrunner.vcxproj]
C:Librarieslibpqxxbuild_armtestReleaserunner. : fatal error LNK1120: 3 unresolved externals [C:Librarieslibpqxx
build_armtestrunner.vcxproj]

i tried to change the CMakeLists and everything, but nothing happened.

i tried the instructions so i can include the library into my plc next project, because i cant build my project without the proper library.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT