title: How solve c++ POCO lib linking error on ARM Linux
body: <p>I try to link the Poco C++ library with my project on ARM Linux, but I get the linking error.
  Link error message:</p>
  <pre><code>foo.so: undefined reference to `Poco::JSON::Object::Object(int)'
  foo.so: undefined reference to `Poco::JSON::Array::Array(int)'
  foo.so: undefined reference to `Poco::JSON::Parser::Parser(Poco::SharedPtr&lt;Poco::JSON::Handler, Poco::ReferenceCounter, Poco::ReleasePolicy&lt;Poco::JSON::Handler&gt; &gt; const&amp;)'
  foo.so: undefined reference to `Poco::format(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, char const*, std::vector&lt;Poco::Any, std::allocator&lt;Poco::Any&gt; &gt; const&amp;)'
  collect2: error: ld returned 1 exit status
  </code></pre>
  <p>Poco was built with <code>crossbuild-essential-armhf</code> tools and used this bash script:</p>
  <pre><code>#!/usr/bin/env bash
  apt-get update
  apt-get install crossbuild-essential-armhf -y
  
  git clone -b poco-1.11.1-release https://github.com/pocoproject/poco.git
  cd poco
  ./configure --config=ARM-Linux --everything --no-tests --no-samples --omit=PDF,Crypto,NetSSL_OpenSSL,JWT,Data/MySQL,Data/ODBC,Data/PostgreSQL &amp;&amp;
            make all -s -j4 ARCHFLAGS=&quot;-mcpu=cortex-a8 -mfloat-abi=hard -mfpu=neon&quot; TOOL=arm-linux-gnueabihf &amp;&amp; make install
  cd ../
  </code></pre>
  <p>But the project was built with <code>g++</code> compiler.</p>
  <p>Also here is the projects <code>CMakeLists.txt</code> file. The 20th version of CMake has been used</p>
  <pre><code>cmake_minimum_required (VERSION 3.17)
  
  project(&quot;test&quot;)
  
  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/)
  include_directories(/usr/local/include)
  
  SET(CMAKE_BUILD_TYPE Release)
  find_package(Poco REQUIRED Foundation Net Util)
  
  add_definitions(-std=c++1z -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
  SET(SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/)
  file(GLOB SRCS_PATH ${SRC_PATH}*.cpp)
  
  SET(EXECS ${SRC_PATH}/main.cpp)
  
  link_directories(/usr/local/lib/)
  
  add_library(${PROJECT_NAME} ${SRCS_PATH})
  
  target_link_libraries(${PROJECT_NAME} Poco::Net Poco::Util Poco::Foundation)
  
  FOREACH(exec_src ${EXECS})
      get_filename_component(exec_name ${exec_src} NAME_WE)
      add_executable(${exec_name} ${exec_src})
      target_link_libraries(${exec_name} ${PROJECT_NAME})
  ENDFOREACH()
  
  </code></pre>