Overview
Features
Download
Documentation
Community
Add-Ons & Services

Unable to link DateTimeFormatter::format

Please post support and help requests here.

Unable to link DateTimeFormatter::format

Postby wpwaldner » 19 Jun 2009, 23:03

I created a simple program running on Debian 5 with libPoco-Dev installed. When I compile, linker can't find format method. I am able to get this to work on a different machine, so this is greatly puzzling me.

this...
#include "Poco/DateTimeFormat.h"
#include "Poco/DateTimeFormatter.h"
#include "Poco/Timespan.h"
#include <iostream>

int main(int argc, char** argv)
{
Poco::Timespan t(2,0);
std::cout << "TimeSpan: " << t.totalSeconds();
std::cout << "Format: " << Poco::DateTimeFormatter::format(t);
}

compiled with ...
g++ tt.cpp -lPocoFoundation

produces
/tmp/ccbc0iAC.o: In function `Poco::DateTimeFormatter::format(Poco::Timespan const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
tt.cpp:(.text._ZN4Poco17DateTimeFormatter6formatERKNS_8TimespanERKSs[Poco::DateTimeFormatter::format(Poco::Timespan const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x3b): undefined reference to `Poco::DateTimeFormatter::append(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, Poco::Timespan const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: ld returned 1 exit status
wpwaldner
 
Posts: 1
Joined: 19 Jun 2009, 22:53

Return to Support

Who is online

Users browsing this forum: No registered users and 10 guests