Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ndk-build on OS X #7

Closed
victorv opened this issue Apr 5, 2017 · 2 comments
Closed

ndk-build on OS X #7

victorv opened this issue Apr 5, 2017 · 2 comments

Comments

@victorv
Copy link

victorv commented Apr 5, 2017

Hi @natanielruiz - thanks for the library. Building on OS X 10.11.6 (El Capitan) using latest NDK (14.0.3770861) gives the following during ndk-build -

[armeabi-v7a] Compile++ arm : tensorflow_demo <= tensorflow_jni.cc
jni/./tensorflow_jni.cc: In function 'std::string ClassifyImage(const {anonymous}::RGBA*)':
jni/./tensorflow_jni.cc:318:33: error: 'output' cannot be used as a function
const float value = output(i);
^
jni/./tensorflow_jni.cc:319:16: error: base operand of '->' has non-pointer type 'std::vector'
top_results->push_back(value);
^
jni/./tensorflow_jni.cc:321:27: error: base operand of '->' has non-pointer type 'std::vector'
std::reverse(top_results->begin(), top_results->end());
^
jni/./tensorflow_jni.cc:321:49: error: base operand of '->' has non-pointer type 'std::vector'
std::reverse(top_results->begin(), top_results->end());
^
jni/./tensorflow_jni.cc: At global scope:
jni/./tensorflow_jni.cc:171:13: warning: 'void GetTopN(const Eigen::TensorMap<Eigen::Tensor<float, 1, 1, int>, 16>&, int, float, std::vector<std::pair<float, int> >*)' defined but not used [-Wunused-function]
static void GetTopN(
^
make[1]: *** [obj/local/armeabi-v7a/objs/tensorflow_demo/./tensorflow_jni.o] Error 1

output is a pointer to a tensor not a function - not sure how this compiles?

@victorv victorv closed this as completed Jul 22, 2017
@lisongting
Copy link

hi @victorv ,I encountered the same problem as yours .Could you please tell me how you fix it ?

@haophancs haophancs mentioned this issue Sep 18, 2017
@haophancs
Copy link

Can you please tell me how you fixed this error. I've a same error bút I've no idea to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants