Al G Johnston
Al G Johnston

Reputation: 139

Android Studio 3.5.1 with NDK 20.0 can't find cstdint

How do I get a cpp file in my project to find the header cstdint?

Upvotes: 0

Views: 535

Answers (1)

Al G Johnston
Al G Johnston

Reputation: 139

The problem was that I had to add my source files to the add_library method in CMakeList.txt.

Also, I added arguments "-DANDROID_STL=c++_shared" to the android.defaultConfig.externalNativeBuild.cmake method in the build.gradle for Module.app. I think this is the default behavior and isn't necessary though.

I made the mistake of assuming the source files were added to CMakeList.txt automatically.

Upvotes: 2

Related Questions