Log in or register to post comments

error: 'string' is not a member of 'std'

May 13, 2013 - 6:24am #1

Hello,

    I'm not quite sure if it's the right place here to post this problem.

     I tried to send string message to java in native c++ file,

    But something strange happens when I declare a string variable,

     when i was doing ndk-build, it failed with this error 

       error: 'string' was not declared in this scope

    then I  tried std::string to declare variable,

    it failed again with this error:

    error: 'string' is not a member of 'std'

 

I coded in the FrameMarker example  native c++ file, would you help me work it out? Thanks!

 

       

error: 'string' is not a member of 'std'

May 13, 2013 - 10:08pm #4

you're welcome

error: 'string' is not a member of 'std'

May 13, 2013 - 8:35pm #3

It works !Thank you !

error: 'string' is not a member of 'std'

May 13, 2013 - 7:27am #2

Hi, have you added:

#include <string>

?

Also, you need to enable the use of STL in your application.mk file (under the JNI directory), by adding this line

 

APP_STL := stlport_static

 

 

 

Log in or register to post comments