android - NDK unable to deal with #include with relative paths? -
i'm writing adroid app c++ code behind ui using eclipse + ndk (r8d). have code thought fool proof compiler gives me weird errors "invalid arguments" without specifics. here c++ code looks like:
#include <jni.h> #include <string> using namespace std; #include "../../evaluator.engine/evaluator.engine.h" evaluator evaluator; extern "c" { jniexport jstring jnicall java_haskellevaluator_android_mainactivity_evaluatenative(jnienv *env, jobject, jstring jinput) { ... string sinput(l"hello world"); string sresult = evaluator.evaluate(sinput); jstring jresult = env->newstringutf(sresult.data()); return jresult; } } evaluator.engine.h nothing fancy, declaration of class evaluator.
#include <string> using namespace std; class evaluator { public: string evaluate(string input); }; however, compiler complains:
invalid arguments ' candidates are: ? evaluate(?) ' as if string not defined. if put copy of header file under same folder, error goes away. windows box. have tried using \ , escaped \\ path separators , didn't work.
does sound ndk (or whatever preprocessor uses) bug? don't want move header file because it'll shared other projects. hate keep 2 copies of same file.
any ideas? thanks.
sorry don't have windows os, i've tried code on macos, doesn't work because of:
string sinput(l"hello world"); saying wchar_t cannot put on std::string. possible same problem ?
Comments
Post a Comment