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

Using clandmark in Android app with native c++ #85

Open
ithmz opened this issue Jul 12, 2018 · 6 comments
Open

Using clandmark in Android app with native c++ #85

ithmz opened this issue Jul 12, 2018 · 6 comments
Labels

Comments

@ithmz
Copy link

ithmz commented Jul 12, 2018

I want to use clandmark lib in my Android app but using native c++;
Should I include all the *.h and *.cpp files in the libclandmark folder? Is the RapidXML is necessary?
I have my own face detector so I don't need the OpenCV haar cascade, how do I remove them?

Thank you

@uricamic
Copy link
Owner

Hi @tsangz189,

yep RapidXML is necessary, as models are stored in XML files. OpenCV is not needed at all, it is used just in examples.
I think you might get inspired in the CMakeLists.txt files, there you see what header and source files are needed where.

I am not very familiar with Android app development. But if it supports native c++, you might even use the CLandmark in the form of dynamically linked precompiled library?

@ithmz
Copy link
Author

ithmz commented Jul 13, 2018

When built successfully, I have two static lib (libclandmark & libflandmark). Should I import both of them?

@uricamic
Copy link
Owner

Yep, both are required. You can also build them dynamically, just change BUILD_SHARED_LIBS CMake settings.

@ithmz
Copy link
Author

ithmz commented Jul 13, 2018

I tried to build the lib using android ndk. An error apprears:
'clandmark::CDAGMaxSumSolver' must explicitly initialize the base class 'clandmark::CMaxSumSolver' which does not have a default constructor?

@uricamic
Copy link
Owner

Hmm, looks like some construct are not supported by the compiler anymore...
I will try to look at this over weekend.

In the meanwhile, you might try to write a simple workaround for now, by creating that empty constructor which is missing.

@ithmz
Copy link
Author

ithmz commented Jul 13, 2018

Yes, it's very weird. I can build and run using Cmake, but with ndk-build of Android, it shows that error. Thank you for your time

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

No branches or pull requests

2 participants