Android ndk 需要NDK帮助:如何呼叫C++;用于另一个使用C++;
我很难受,因为我搞不懂(尽管在谷歌上搜索了很多)。请帮忙 情况:Android ndk 需要NDK帮助:如何呼叫C++;用于另一个使用C++;,android-ndk,Android Ndk,我很难受,因为我搞不懂(尽管在谷歌上搜索了很多)。请帮忙 情况: class foo { const char* giveMeAString(); } #include “foo.h” const char* foo::giveMeAString() { return “Hello World!”; } 我有一个共享的图书馆。比方说foo.so(完全用C++编写代码) 现在在一个新项目中,我想使用这个共享库foo.so 新的项目代码也在C++中。假设新项目名为fooMate 我想调用fun
class foo
{
const char* giveMeAString();
}
#include “foo.h”
const char* foo::giveMeAString()
{
return “Hello World!”;
}
class foo
{
const char* giveMeAString();
}
#include “foo.h”
const char* foo::giveMeAString()
{
return “Hello World!”;
}
现在我已经在名为:foo.so的共享库中成功编译了foo类
#include “fooMate.h”
#include “foo.h”
void fooMate::printDemo()
{
foo *testFoo = new foo();
cout<<giveMeAString();
}