[odb-users] C++11 with clang on OSX 10.8

Philipp Maluta fil.the.ensoreus at gmail.com
Tue Aug 27 13:11:57 EDT 2013


Still no luck.
Building libodb with c++11
./configure CXX=clang++ CC=clang CXXFLAGS="--std=c++11 --stdlib=libc++" --prefix=/opt/local --disable-threads
make 

….compiling….

Undefined symbols for architecture x86_64:
  "std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
      std::__1::vector<odb::query_base::clause_part, std::__1::allocator<odb::query_base::clause_part> >::__append(unsigned long) in query-dynamic.o
      void std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::__push_back_slow_path<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&) in query-dynamic.o
      void std::__1::vector<odb::query_base::clause_part, std::__1::allocator<odb::query_base::clause_part> >::__push_back_slow_path<odb::query_base::clause_part>(odb::query_base::clause_part&&) in query-dynamic.o
      void std::__1::vector<bool (*)(odb::database&, unsigned short, bool), std::__1::allocator<bool (*)(odb::database&, unsigned short, bool)> >::__push_back_slow_path<bool (* const&)(odb::database&, unsigned short, bool)>(bool (* const&&&)(odb::database&, unsigned short, bool)) in schema-catalog.o
      void std::__1::vector<odb::transaction::callback_data, std::__1::allocator<odb::transaction::callback_data> >::__push_back_slow_path<odb::transaction::callback_data>(odb::transaction::callback_data&&) in transaction.o
  "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in tracer.o
      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in tracer.o

So, is there a some article of how to use odb with c++11?
Very appreciate for your help.


27 авг. 2013, в 17:30, Boris Kolpackov <boris at codesynthesis.com> написал(а):

> Hi Philipp,
> 
> Philipp Maluta <fil.the.ensoreus at gmail.com> writes:
> 
>> libodb-sqlite built with 
>> configure CC=clang  CPPFLAGS="--std=c++11 --libstd=libc++" [...]
> 
> You are still probably building with g++ since you only specified
> the C compiler, not C++. So this should be:
> 
> configure CXX=clang++ CXXFLAGS="--std=c++11 --libstd=libc++" ...
> 
> Also, make sure that the generated code (and the rest of your
> application) is built with the same options (--std=c++11 and
> --libstd=libc++).
> 
> Boris
> 
> 




More information about the odb-users mailing list