JDS
JDS

Reputation: 16968

Android NDK: using other C++ libraries

I am trying to run some existing C++ code in an Android application. I have the NDK set up, and have the source files copied into the jni folder in my Eclipse project.

My C++ files have includes and namespace uses that come from elsewhere though, and I'm unsure how to properly import (install?) them into my Android project.

Code in C++ file:

#include <gvars3/instances.h>
#include <TooN/SVD.h>
#include <fstream>
#include <stdlib.h>

using namespace CVD;
using namespace std;
using namespace GVars3;

All of these libraries are "unresolved inclusion". How can I get these libraries into my project?

Thanks.

Upvotes: 1

Views: 206

Answers (1)

Yongwei Wu
Yongwei Wu

Reputation: 5582

It is not different from the usual way. You can do one of the following:

  • Pull all the source together and build a single .so
  • Build the other libraries as separate .so files, and load them before your own .so in your Android project (the order is important)

Upvotes: 1

Related Questions