I ran into a similar problem when trying to build 2.5.0 for use in an iOS 7 
app with Xcode 5.  My solution was to do the following:

./configure
sed -i .orig 's/tr1\\///g' config.h
sed -i .orig 's/::tr1//g' config.h

That seemed to work fine.  I would love to find a set of configure 
command-line options that set the compiler properly so I didn't need to get 
rid of the tr1 namespace manually.

The other thing I still ran into was a number of 32-bit/64-bit warnings 
about loss of precision and was not sure what the best way to correct those 
issues was.

Cheers

-- Bennett


On Thursday, October 17, 2013 12:41:30 PM UTC-7, prot...@googlecode.com 
wrote:
>
> Status: New 
> Owner: liu...@google.com <javascript:> 
> Labels: Type-Defect Priority-Medium 
>
> New issue 567 by gang.wu....@gmail.com: Cannot build protobuf with C++11 
>   
> support in Mac 10.8 
> http://code.google.com/p/protobuf/issues/detail?id=567 
>
> What steps will reproduce the problem? 
> 1.Install latest XCode (5.0) in Mac 10.8.5 or above to have c++11 support 
>   
> with clang 
> 2.Configure the compiler to use c++ 11 by run the command 
> ./configure CC="/usr/bin/clang" CPP="/usr/bin/clang -E"   
> CXX="/usr/bin/clang++" CXXCPP="/usr/bin/clang++ -E" CXXFLAGS="-std=c++11   
> -stdlib=libc++ -arch i386" LIBTOOL="/usr/bin/libtool" 
> 3.make 
>
> What is the expected output? What do you see instead? 
> Expected: The lib should be build successfully 
> Actual: compile stage looks fine. But there are a bunch of link errors   
> related std namespace, such as 
>
> libtool: link: /usr/bin/clang++ -dynamiclib   
> -o .libs/libprotobuf.8.dylib  .libs/atomicops_internals_x86_gcc.o 
> .libs/atomicops_internals_x86_msvc.o .libs/common.o .libs/once.o 
> .libs/stringprintf.o .libs/extension_set.o .libs/generated_message_util.o 
> .libs/message_lite.o .libs/repeated_field.o .libs/wire_format_lite.o 
> .libs/coded_stream.o .libs/zero_copy_stream.o 
> .libs/zero_copy_stream_impl_lite.o .libs/strutil.o .libs/substitute.o 
> .libs/structurally_valid.o .libs/descriptor.o .libs/descriptor.pb.o 
> .libs/descriptor_database.o .libs/dynamic_message.o 
> .libs/extension_set_heavy.o .libs/generated_message_reflection.o 
> .libs/message.o .libs/reflection_ops.o .libs/service.o .libs/text_format.o 
> .libs/unknown_field_set.o .libs/wire_format.o .libs/gzip_stream.o 
> .libs/printer.o .libs/tokenizer.o .libs/zero_copy_stream_impl.o 
> .libs/importer.o .libs/parser.o     
> -lz  -arch i386   -install_name  /usr/local/lib/libprotobuf.8.dylib   
> -compatibility_version 9 -current_version 9.0 -Wl,-single_module 
> Undefined symbols for architecture i386: 
>    "std::__1::basic_string<char, std::__1::char_traits<char>,   
> std::__1::allocator<char> >::find_first_of(char const*, unsigned long,   
> unsigned long) const", referenced from: 
>        void   
> google::protobuf::SplitStringToIteratorUsing<std::__1::back_insert_iterator<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> > > > >   
> >(std::__1::basic_string<char, std::__1::char_traits<char>,   
> std::__1::allocator<char> > const&, char const*,   
> std::__1::back_insert_iterator<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> > > > >&) in   
> strutil.o 
>
>
> What version of the product are you using? On what operating system? 
> 2.5.0, Mac OS 10.8.5, with XCode 5.0 installed 
>
> Please provide any additional information below. 
>
> Probably we need some extra parameters to configure the make file. Can you 
>   
> provide some instructions on this? 
>
> -- 
> You received this message because this project is configured to send all   
> issue notifications to this address. 
> You may adjust your notification preferences at: 
> https://code.google.com/hosting/settings 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to