1

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

奇怪的是,在我从山狮升级到小牛之前,这一切都没有发生。

./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
4

1 回答 1

1

配置通常会注意 CC 和 CXX 环境变量,以允许您更改软件将使用的编译器。尝试调整这些设置。

于 2014-05-16T04:34:06.537 回答