2017-02-05 10 views
0

Ubuntu 14.04 64bitデスクトップでアンドロイドNDKスタンドアロンツールチェーンでmxnet(v0.9.3)合併をコンパイルしていましたが、私は「-msse2」オプションを削除して、再度makefileを実行すると、それはより多くをコンパイルできandroid-ndk:stoi/stof/stod/to_stringは 'std'のメンバーではありません

arm-linux-androideabi-g++ -std=c++11 -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -fPIC -M -MT nnvm.o \ 
    -I `pwd`/../ -I `pwd`/../include \ 
    -D__MIN__=0 nnvm.cc > nnvm.d 
arm-linux-androideabi-g++: error: unrecognized command line option '-msse2' 

が、後、私はそれらのような新たなエラー会っ: 最初のエラーがある私が何をすべき

jni/../mxnet_predict-all.cc:2801:37: error: 'fopen64' was not declared in this scope 
jni/../mxnet_predict-all.cc:21495:14: error: 'stoi' is not a member of 'std' 
jni/../mxnet_predict-all.cc:30077:52: error: 'to_string' is not a member of 'std' 
jni/../mxnet_predict-all.cc:34298:29: error: 'stof' is not a member of 'std' 
jni/../mxnet_predict-all.cc:41383:56: error: 'stod' is not a member of 'std' 
…… 

をそれらを解決する?

BTW: android-ndk-r13bです。 $ python NDK/build/tools/make_standalone_toolchain.py --arch arm --api 21 --install-dir /tmp/my-android-toolchain

export PATH=$PATH:/tmp/my-android-toolchain/bin 
export CXX=arm-linux-androideabi-g++ 
export CC=arm-linux-androideabi-gcc 

詳細情報::私のmxnet_predict-all.ccのhttps://github.com/dmlc/mxnet/issues/4888


の#include:

#if defined(__MACH__) 
#include <mach/clock.h> 
#include <mach/mach.h> 
#endif 

#if !defined(__WIN32__) 
#include <sys/stat.h> 
#include <sys/types.h> 

#if !defined(__ANDROID__) && (!defined(MSHADOW_USE_SSE) || MSHADOW_USE_SSE == 1) 
#include <emmintrin.h> 
#endif 

#endif 

#include <algorithm> 
#include <array> 
#include <assert.h> 
#include <atomic> 
#include <cblas.h> 
#include <cctype> 
#include <cfloat> 
#include <chrono> 
#include <climits> 
#include <cmath> 
#include <condition_variable> 
#include <cstddef> 
#include <cstdint> 
#include <cstdio> 
#include <cstdlib> 
#include <cstring> 
#include <ctime> 
#include <deque> 
#include <dirent.h> 
#include <errno.h> 
#include <fstream> 
#include <functional> 
#include <inttypes.h> 
#include <iostream> 
#include <istream> 
#include <limits> 
#include <list> 
#include <map> 
#include <memory> 
#include <mutex> 
#include <new> 
#include <ostream> 
#include <queue> 
#include <random> 
#include <regex> 
#include <sched.h> 
#include <set> 
#include <sstream> 
#include <stdbool.h> 
#include <stddef.h> 
#include <stdexcept> 
#include <stdint.h> 
#include <stdlib.h> 
#include <streambuf> 
#include <string> 
#include <thread> 
#include <time.h> 
#include <tuple> 
#include <type_traits> 
#include <typeindex> 
#include <typeinfo> 
#include <unordered_map> 
#include <unordered_set> 
#include <utility> 
#include <vector> 
+0

含まれていましたか?例えば。 'stoi'は' string'ヘッダに宣言されています: 'mxnet_predict-all.cc'に' #include 'がありますか? – wasthishelpful

+0

あなたはGNU STLを使用していますか?そうであれば、例えばhttp://stackoverflow.com/a/18124627/1524450 – Michael

+0

@wasthishelpfulはい私はを含む。私はちょうど私の質問で私のmxnet_predict - all.ccの#includesの部分をatteched。チェックしてください。 – ROKIM

答えて

1

それを は、スタンドアロンのツールチェーンを作成するために、私はこれらの手順に従っGNU STLライブラリの問題のようです。私はアンドロイドツールチェーンをオプション '--stl = libC++'で再構築し、正常にコンパイルしました。

0

これは、それはR13になりませんhttps://github.com/android-ndk/ndk/issues/82#issuecomment-236979264

です。このための "修正"は、libC++に取り組んでいるので、gnustlは不要になります。おそらくそれが行われるのはr14です。それはr13の全焦点でしたが、それを達成するための中間的なタスクがたくさんあります。あなたは、これらの機能を使用するために必要なファイルを

(つまり、R13、R14もしていなかったが、それは今はR15のために取り組んでいるものを実際にある)

関連する問題