Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

Mutex compiliation error #70

Open
yassiezar opened this issue Apr 28, 2016 · 2 comments
Open

Mutex compiliation error #70

yassiezar opened this issue Apr 28, 2016 · 2 comments

Comments

@yassiezar
Copy link

HI,

I'm having trouble compiling some of the examples that use the Mutex library. At compile time, it throws me this error:

~/Android/ndk-examples/tango-examples-c/cpp_motion_tracking_example/app/src/main/jni/tango-motion-tracking/motion_tracking_app.h
Error:(96, 8) error: 'mutex' in namespace 'std' does not name a type

Referring to this line in motion_tracking_app.h:

std::mutex pose_mutex_;

Has anyone else ran into this problem? I'm still getting started with Tango and the NDK so I'm having trouble debugging this error.

@yassiezar
Copy link
Author

I managed to fix it. Changing the APP_STL line in the Application.mk file to use c++_static instead of gnustl_static seems to have fixed it

@andersgb
Copy link

andersgb commented May 5, 2017

Do you compile with C++11 support? gnustl_static should happily work with std::mutex if you set LOCAL_CPPFLAGS := -std=c++11 in your Android.mk

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

No branches or pull requests

2 participants