我试过用几种方式构建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发布于 2014-05-16 04:34:06
配置通常会注意CC和CXX环境变量,以允许您更改软件将使用的编译器。尝试并调整这些设置。
https://stackoverflow.com/questions/23692239
复制相似问题