title: Poco library linking errors in ubuntu platform
body: <p>I have downloaded the latest Poco library poco-1.7.3.tar. Configured with few properties and did make install.
  Tried the following sample helloworld program. </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;Poco/Util/Application.h&gt;
  
  class HelloPocoApplication : public Poco::Util::Application
  {
  protected:
      virtual int main(const std::vector&lt;std::string&gt; &amp;args)
      {
              std::cout &lt;&lt; "Hello, POCO C++ Libraries!" &lt;&lt; std::endl;
  
              return EXIT_OK;
      }
  };
  POCO_APP_MAIN(HelloPocoApplication);
  </code></pre>
  
  <p>Compiled it using</p>
  
  <blockquote>
    <p>g++ -I poco-1.7.3/Util/include -I poco-1.7.3/XML/include -I poco-1.7.3/JSON/include -I poco-1.7.3/Foundation/include -L poco-1.7.3/lib/Linux/x86_64 -lPocoUtil -lPocoFoundation -lPocoXML -lPocoJSON helloworld.cpp -o prog</p>
  </blockquote>
  
  <p>But it is throwing following errors</p>
  
  <pre><code> /tmp/ccFvl4ll.o: In function `main':
   helloworld.cpp:(.text+0x4f): undefined reference to     `Poco::Util::Application::init(int, char**)'
        helloworld.cpp:(.text+0xd9): undefined reference to    `Poco::Logger::log(Poco::Exception const&amp;)'
      /tmp/ccFvl4ll.o: In function `Poco::RefCountedObject::release() const':
      helloworld.cpp:(.text._ZNK4Poco16RefCountedObject7releaseEv[_ZNK4Poco16RefCountedObject7releaseEv]+0x6e): undefined reference to `Poco::Bugcheck::unexpected(char const*, int)'
      /tmp/ccFvl4ll.o: In function `Poco::Util::Application::logger() const':
      helloworld.cpp:(.text._ZNK4Poco4Util11Application6loggerEv[_ZNK4Poco4Util11Application6loggerEv]+0x2c): undefined reference to `Poco::Bugcheck::nullPointer(char const*, char const*, int)'
      /tmp/ccFvl4ll.o: In function `HelloPocoApplication::HelloPocoApplication()':
      helloworld.cpp:(.text._ZN20HelloPocoApplicationC2Ev[_ZN20HelloPocoApplicationC5Ev]+0x14): undefined reference to `Poco::Util::Application::Application()'
      /tmp/ccFvl4ll.o:(.gcc_except_table+0x2c): undefined reference to `typeinfo for Poco::Exception'
      /tmp/ccFvl4ll.o: In function `Poco::AutoPtr&lt;HelloPocoApplication&gt;::operator-&gt;()':
      helloworld.cpp:(.text._ZN4Poco7AutoPtrI20HelloPocoApplicationEptEv[_ZN4Poco7AutoPtrI20HelloPocoApplicationEptEv]+0x3a): undefined reference to `Poco::NullPointerException::NullPointerException(int)'
      helloworld.cpp:(.text._ZN4Poco7AutoPtrI20HelloPocoApplicationEptEv[_ZN4Poco7AutoPtrI20HelloPocoApplicationEptEv]+0x3f): undefined reference to `Poco::NullPointerException::~NullPointerException()'
      helloworld.cpp:(.text._ZN4Poco7AutoPtrI20HelloPocoApplicationEptEv[_ZN4Poco7AutoPtrI20HelloPocoApplicationEptEv]+0x44): undefined reference to `typeinfo for Poco::NullPointerException'
      /tmp/ccFvl4ll.o:(.rodata._ZTV20HelloPocoApplication[_ZTV20HelloPocoApplication]+0x20): undefined reference to `Poco::Util::Application::name() const'
      /tmp/ccFvl4ll.o:(.rodata._ZTV20HelloPocoApplication[_ZTV20HelloPocoApplication]+0x28): undefined reference to `Poco::Util::Application::initialize(Poco::Util::Application&amp;)'
      /tmp/ccFvl4ll.o:(.rodata._ZTV20HelloPocoApplication[_ZTV20HelloPocoApplication]+0x30): undefined reference to `Poco::Util::Application::uninitialize()'
      /tmp/ccFvl4ll.o:(.rodata._ZTV20HelloPocoApplication[_ZTV20HelloPocoApplication]+0x38): undefined reference to `Poco::Util::Application::reinitialize(Poco::Util::Application&amp;)'
      /tmp/ccFvl4ll.o:(.rodata._ZTV20HelloPocoApplication[_ZTV20HelloPocoApplication]+0x40): undefined reference to `Poco::Util::Application::defineOptions(Poco::Util::OptionSet&amp;)'
      /tmp/ccFvl4ll.o:(.rodata._ZTV20HelloPocoApplication[_ZTV20HelloPocoApplication]+0x48): undefined reference to `Poco::Util::Application::run()'
      /tmp/ccFvl4ll.o:(.rodata._ZTV20HelloPocoApplication[_ZTV20HelloPocoApplication]+0x50): undefined reference to `Poco::Util::Application::handleOption(std::string const&amp;, std::string const&amp;)'
      /tmp/ccFvl4ll.o: In function `HelloPocoApplication::~HelloPocoApplication()':
      helloworld.cpp:(.text._ZN20HelloPocoApplicationD2Ev[_ZN20HelloPocoApplicationD5Ev]+0x1f): undefined reference to `Poco::Util::Application::~Application()'
      /tmp/ccFvl4ll.o:(.rodata._ZTI20HelloPocoApplication[_ZTI20HelloPocoApplication]+0x10): undefined reference to `typeinfo for Poco::Util::Application'
      collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>Can you please help me?</p>