2017-01-31 6 views
0

XCode 5.0.1は、161 C++プロジェクトファイルのコンパイルが成功した後にエラーが発生します。 多くのApple Mach-O Linkerエラーの質問がありましたが、何も私を助けませんでした。エラーのApple Mach-O Linker(ld)エラーです。 ld:-rと-dead-stripを同時に使用することはできません。

メッセージは以下の通りです:

ld: -r and -dead_strip cannot be used together 
clang: error: linker command failed with exit code 1 
(use -v to see invocation) 

私のビルド設定でのリンクのセクションでは、次の画像である:

Linker Section of XCode 5.0.1

誰も私を解決する方法を知らせることができますこのエラー?

UPDATE

私はNoDead Code Strippingを設定すると、私は19個のリンクエラーが発生します。 Mach-O TypeReleaseDebugの両方についてDynamic Libraryに設定されています。

Undefined symbols for architecture x86_64: 
     "boost::re_detail_106000::perl_matcher<__gnu_cxx::__normal_iterator<wchar _t const*, std::basic_string<wchar_t, std::char_traits<wchar_t>,  std::allocator<wchar_t> > >,  std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<wchar_t  const*, std::basic_string<wchar_t, std::char_traits<wchar_t>,  std::allocator<wchar_t> > > > >, boost::regex_traits<wchar_t,  boost::cpp_regex_traits<wchar_t> >  >::construct_init(boost::basic_regex<wchar_t,  boost::regex_traits<wchar_t, boost::cpp_regex_traits<wchar_t> > > const&,  boost::regex_constants::_match_flags)", referenced from: 
     boost::re_detail_106000::perl_matcher<__gnu_cxx::__normal_iterator<wchar_ t const*, std::basic_string<wchar_t, std::char_traits<wchar_t>,  std::allocator<wchar_t> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<wchar_t const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > >, boost::regex_traits<wchar_t, boost::cpp_regex_traits<wchar_t> > >::perl_matcher(__gnu_cxx::__normal_iterator<wchar_t const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, __gnu_cxx::__normal_iterator<wchar_t const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::match_results<__gnu_cxx::__normal_iterator<wchar_t const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<wchar_t const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > > >&, boost::basic_regex<wchar_t, boost::regex_traits<wchar_t, boost::cpp_regex_traits<wchar_t> > > const&, boost::regex_constants::_match_flags, __gnu_cxx::__normal_iterator<wchar_t const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >) in AdWrksTagDataFactory.o 

、エラーメッセージを次のように:この場合 エラーは以下の通りです

ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

を、私は、これはブーストの複数のバージョンが原因かもしれないと見ていたいくつかの類似した質問ではなく、私はすでにそれをチェックした。

答えて

0

Dead Code StrippingからNoに設定してください。このオプションがYesに設定されている場合、Xcodeはリンク時にがサポートされていないため、のリンク時に-dead_stripフラグを追加します。

+0

返信いただきありがとうございますが、私はすでにチェックしています。それは私に10リンクエラーを示しています。 – d0mbn00b

+0

どのようなエラーが発生しますか?それらは元の質問と無関係かもしれません。 – Steeve

+0

私は質問でそれらを更新しました。見てください。 – d0mbn00b

関連する問題