When linking against poco, get RegularExpression error

285 Views Asked by At

I have tried building poco (poco-1.4.6p4) in several ways, all seem to build fine. However, when linking against it, all the different ways I have tried to build poco give error below. No matter what I choose, it appears that poco is being built with the clang++.

What is strange is that before I upgraded from Mountain Lion to Mavericks, none of this happened.

./configure --Darwin64 --shared

and

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

and

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

All the above seem to build fine.

But when I link against any of them, they all give the error below when linking against it.

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

There are 1 best solutions below

1
On BEST ANSWER

Configure generally will pay attention to CC and CXX environment variables to allow you to change compilers the software will build with. Try and adjust these settings.