2011-11-25 15 views
5

にアンドロイドのための後押しをコンパイルしながら、私はfollowing article認識されないコマンドラインオプションcygwinの

の助けを借りて、cygwinの上のブーストをコンパイルしようとしています。しかし、私は声明

bjam --without-python --without-serialization toolset=gcc-android4.4.3 link=static runtime-link=static target-os=linux --stagedir=android 

次実行したときにそれがコンパイルを開始したが、原因に失敗しましたエラー以下:

cc1plus.exe: error: unrecognized command line option "-mthreads" 

私は、最新のcygwinのブースト1.48.0

を使用しています

誰かが私にこのエラーを取り除くヒントを与えることができたら、私は感謝します。

更新:

解決策が見つかりました。 BoostはCygwinがMingW gccコンパイラを持っているので、設定ファイル "gcc.jam"に特別なオプションを追加しました。

+0

に依存して見ることができるように。私はあなたがそれを行うことができますstackoverflowする前に、いくつかの時間を待たなければならないと思う。 –

答えて

0

ショート

パスtarget-os=android

説明

b2に私はブースト1.59

よるboost/tools/build/src/tools/gcc.jamラインのために同じ問題に直面した1024

rule setup-threading (targets * : sources * : properties *) 
{ 
    local threading = [ feature.get-values threading : $(properties) ] ; 
    if $(threading) = multi 
    { 
     local target = [ feature.get-values target-os : $(properties) ] ; 
     local option ; 
     local libs ; 

     switch $(target) 
     { 
      case android : # No threading options, everything is in already. 
      case windows : option = -mthreads ; 
      case cygwin : option = -mthreads ; 
      case solaris : option = -pthreads ; libs = rt ; 
      case beos : # No threading options. 
      case haiku : option = ; 
      case *bsd : option = -pthread ; # There is no -lrt on BSD. 
      case sgi  : # gcc on IRIX does not support multi-threading. 
      case darwin : # No threading options. 
      case *  : option = -pthread ; libs = rt ; 
     } 

     if $(option) 
     { 
      OPTIONS on $(targets) += $(option) ; 
     } 
     if $(libs) 
     { 
      FINDLIBS-SA on $(targets) += $(libs) ; 
     } 
    } 
} 

あなたは-mthreadsあなたが答えると、あなた自身の質問を受け付けるようにするためにそれは大丈夫ですtarget-osのparam

関連する問題