链接到poco时,会出现RegularExpression错误

时间:2014-05-16 03:36:07

标签: osx-mavericks poco-libraries gcc4.9

我尝试过以几种方式构建poco(poco-1.4.6p4),似乎都很好。但是,当链接它时,我尝试构建poco的所有不同方式都会给出错误。无论我选择什么,似乎poco都是用clang ++构建的。

奇怪的是,在我从Mountain Lion升级到Mavericks之前,没有发生这种情况。

./configure --Darwin64 --shared

./configure --Darwin64-gcc --shared --no-tests

./configure --Darwin64-clang-libc++ --shared --no-tests

以上所有情况似乎都很好。

但是当我链接其中任何一个时,他们都会在链接时给出以下错误。

Making all in compiler
/bin/sh ../libtool  --tag=CXX   --mode=link g++  -g -O2 -Wall -lfix8 -lPocoFoundation -lPocoNet -lPocoUtil  -L../runtime     -lz  -o f8c f8c.o f8cutils.o f8precomp.o  
libtool: link: g++ -g -O2 -Wall -o .libs/f8c f8c.o f8cutils.o f8precomp.o -Wl,-bind_at_load  /Users/ivanfigueredo/Downloads/fix8/runtime/.libs/libfix8.dylib -lpthread -lPocoFoundation -lPocoNet -lPocoUtil -L../runtime -lz
Undefined symbols for architecture x86_64:
  "Poco::RegularExpression::RegularExpression(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool)", referenced from:
      FIX8::RegExp::RegExp(char const*, int) in f8c.o
  "Poco::RegularExpression::match(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, std::vector<Poco::RegularExpression::Match, std::allocator<Poco::RegularExpression::Match> >&, int) const", referenced from:
      _main in f8c.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[1]: *** [f8c] Error 1
make: *** [all-recursive] Error 1

1 个答案:

答案 0 :(得分:1)

配置一般会注意CC和CXX环境变​​量,以便您更改软件将构建的编译器。尝试并调整这些设置。

相关问题