错误request for member 'GetByteArrayElements' in something is not a structure or union

      或错误too few arguements to function (*env)->GetByteArrayElements

     原因:在C的定义中,env是一个两级指针,而在C++的定义中,env是个一级指针

      只有C++时才用: jbyte   *arr   =   env-> GetByteArrayElements(jarr,   0); 
     
      在C中的写法应该是:jbyte   *   arr   =   (*env)-> GetByteArrayElements(env, jarr,   NULL); 

    

相关文章:

  • 2021-06-09
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
  • 2021-04-26
  • 2021-08-30
  • 2021-10-27
  • 2021-11-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-13
  • 2021-08-10
  • 2021-08-11
  • 2022-12-23
  • 2021-06-08
相关资源
相似解决方案