codeblocks和poco库配合问题
最近想做跨平台开发,选用了poco库。首先在Windows下测试,过程是这样的:
1> 使用VS2008编译poco库
2> 安装Code::blocks10.05,然后设置工作环境,设置头文件搜索路径和链接搜索路径
在“settings”—>“Complier and Debugger”中设置
3> 然后在工程中设置使用的库,“project”—>“Build Options”—>“Link Settings”中,添加要链接的库
PocoFoundationd.lib
4> 从示例中拷贝些简单的代码,编译,错误提示如下:
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::LocalDateTime::LocalDateTime()'|
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::DateTimeFormat::ISO8601_FORMAT'|
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::DateTime::DateTime()'|
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::DateTimeFormat::ISO8601_FORMAT'|
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::DateTimeParser::parse(std::string const&, std::string const&, Poco::DateTime&, int&)'|
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::DateTime::makeUTC(int)'|
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::LocalDateTime::LocalDateTime(int, Poco::DateTime const&)'|
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::LocalDateTime::~LocalDateTime()'|
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::DateTime::~DateTime()'|
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::DateTime::~DateTime()'|
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::LocalDateTime::~LocalDateTime()'|
obj\Debug\main.o:main.cpp|| undefined reference to `Poco::LocalDateTime::~LocalDateTime()'|
int)]+0x7d)||undefined reference to `Poco::DateTimeFormatter::append(std::string&, Poco::DateTime const&, std::string const&, int)'|
||=== Build finished: 13 errors, 0 warnings ===
看起来是没有链接到指定的库,几乎试了所有的设置,均无法解决。