2014-11-25 2 views
0

C++ 0x 플래그를 사용하여 여러 플랫폼에서 프로젝트를 컴파일 중입니다. 문제가있는 유일한 플랫폼은 Mac입니다. 그것은 다른 컴파일러가 미끄러지게하는 것들에 대해 화가 난 것 같습니다. 나는 Mac 10.8, Qt 5.3.2를 다음 버전의 clang과 함께 사용하고 있습니다.Windows 및 Linux에서 코드가 컴파일되지만 Mac에서는 컴파일되지 않습니다.

clang -v 
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) 
Target: x86_64-apple-darwin12.5.0 
Thread model: posix 

이것은 생성되는 오류입니다.

In file included from src/qt/bitcoin.cpp:5: 
In file included from ../../Qt5.3.2/5.3/clang_64/lib/QtWidgets.framework/Versions/5/Headers/QApplication:1: 
In file included from ../../Qt5.3.2/5.3/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:45: 
In file included from /Users/user/Qt5.3.2/5.3/clang_64/lib/QtCore.framework/Headers/qcoreapplication.h:45: 
In file included from /Users/user/Qt5.3.2/5.3/clang_64/lib/QtCore.framework/Headers/qglobal.h:78: 
In file included from /Users/user/Qt5.3.2/5.3/clang_64/lib/QtCore.framework/Headers/qcompilerdetection.h:846: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/utility:254:9: error: field has incomplete type 'CScript' 
_T2 second; 
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:1994:27: note: in instantiation of template class 'std::__1::pair<const CScriptID, CScript>' 
    requested here 
      decltype(__is_constructible_test(declval<_Tp>(), declval<_Args>()...)) 
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:2043:14: note: in instantiation of template class 'std::__1::__is_constructible<false, 
    std::__1::allocator<std::__1::pair<const CScriptID, CScript> >>' requested here 
: public __is_constructible<is_scalar<_Tp>::value || is_reference<_Tp>::value, 
     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:2069:14: note: in instantiation of template class 
    'std::__1::__is_constructible_void_check<false, std::__1::allocator<std::__1::pair<const CScriptID, CScript> >>' requested here 
: public __is_constructible_void_check<__contains_void<_Tp, _Args...>::value 
     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:2549:34: note: in instantiation of template class 
    'std::__1::is_constructible<std::__1::allocator<std::__1::pair<const CScriptID, CScript> >>' requested here 
: __is_nothrow_constructible<is_constructible<_Tp, _Args...>::value, _Tp, _Args...> 
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:2671:14: note: in instantiation of template class 
    'std::__1::is_nothrow_constructible<std::__1::allocator<std::__1::pair<const CScriptID, CScript> >>' requested here 
: public is_nothrow_constructible<_Tp> 
     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/map:840:13: note: in instantiation of template class 
    'std::__1::is_nothrow_default_constructible<std::__1::allocator<std::__1::pair<const CScriptID, CScript> > >' requested here 
     is_nothrow_default_constructible<allocator_type>::value && 
     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:332:34: note: expanded from macro '_NOEXCEPT_' 
# define _NOEXCEPT_(x) noexcept(x) 
          ^
src/keystore.h:43:7: note: in instantiation of exception specification for 'map' requested here 
class CBasicKeyStore : public CKeyStore 
^
src/serialize.h:28:7: note: forward declaration of 'CScript' 
class CScript; 
^
src/keystore.h:116:5: note: implicit default constructor for 'CBasicKeyStore' first required here 
CCryptoKeyStore() : fUseCrypto(false) 
^ 
+1

우리 충분한 상황과 오류를 (생성하는 코드) 표시). 또한 : toolchain (Clang 및 libC++)을 업데이트 해보십시오. 이미 버그가 수정되었을 수도 있습니다. – rubenvb

답변

0

동일한 문제가 있는데, clang 및 C++ 11과 관련이있는 것 같습니다.

내 시나리오 : - 맥 OSX 10.10.1 요세미티 - 엑스 코드 6.1 명령 행 도구를 사용하여 6.1 -은 GNU 3.81 만들기 - gcc가 -v : 함께 구성 : --prefix =/응용 프로그램/Xcode.app/Apple LLVM 버전 6.0 (clang-600.0.56) (LLVM 3.5svn 기반) 대상 : x86_64-apple (x86) - 내용 - 개발자 - usr --with-gxx-include-dir =/usr/include/C++/4.2.1 Apple LLVM 버전 6.0 -darwin14.0.0 스레드 모델 : posix No homebrew, no macports, 직접 작성한 일부 종속성.

x86_64 용으로 컴파일하려고합니다.

단서가 있습니까?

내 생각 대신 그 소리의 GCC와 모든 종속성을 다시 컴파일 될 수있다,하지만, 난 여전히 아마 당신을 위해 작동을 테스트하는 시간이 아니다 있었다;

관련 문제