Soundtouch库编译问题 [英] Soundtouch library compile issue

查看:1213
本文介绍了Soundtouch库编译问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译Soundtouch库的Andr​​oid NDK。我成功安装了Cygwin和呷需要Soundtouch库。当我尝试运行NDK-build.cmd,我得到一个错误

I am trying to compile Soundtouch library with Android NDK. I successfully installed Cygwin and SWIG required for Soundtouch library. When I try to run ndk-build.cmd, i am getting an error

JNI / soundtouch / wrapper_wrap.cpp:在功能无效Java_com_talkingyeti_jni2_wrapperJNI_SoundTouch_1putSamples(JNIEnv的*,* _jclass,jlong​​,_jobject *,jlong​​,jlong​​):
  JNI / soundtouch / wrapper_wrap.cpp:545:错误:'SAMPLETYPE在此范围未声明
  JNI / soundtouch / wrapper_wrap.cpp:545:错误:ARG2在此范围未声明
  JNI / soundtouch / wrapper_wrap.cpp:553:错误:预期主要-EX $之前p $ pssion')'令牌
  JNI / soundtouch / wrapper_wrap.cpp:560:错误:预期')''常量'前
  JNI / soundtouch / wrapper_wrap.cpp:560:错误:之前的预期')'';'象征
  令: * 的[OBJ /本地/ armeabi / OBJ文件/ soundtouch / wrapper_wrap.o]错误1

jni/soundtouch/wrapper_wrap.cpp: In function 'void Java_com_talkingyeti_jni2_wrapperJNI_SoundTouch_1putSamples(JNIEnv*, _jclass*, jlong, _jobject*, jlong, jlong)': jni/soundtouch/wrapper_wrap.cpp:545: error: 'SAMPLETYPE' was not declared in this scope jni/soundtouch/wrapper_wrap.cpp:545: error: 'arg2' was not declared in this scope jni/soundtouch/wrapper_wrap.cpp:553: error: expected primary-expression before ')' token jni/soundtouch/wrapper_wrap.cpp:560: error: expected ')' before 'const' jni/soundtouch/wrapper_wrap.cpp:560: error: expected ')' before ';' token make: * [obj/local/armeabi/objs/soundtouch/wrapper_wrap.o] Error 1

此问题发生与wrapper_wrap.cpp以下块:

This issue happens with the following block of wrapper_wrap.cpp :

  SWIGEXPORT void JNICALL Java_com_talkingyeti_jni2_wrapperJNI_SoundTouch_1putSamples(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
  soundtouch::SoundTouch *arg1 = (soundtouch::SoundTouch *) 0 ;
  SAMPLETYPE *arg2 = (SAMPLETYPE *) 0 ;
  uint arg3 ;
  uint *argp3 ;

  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(soundtouch::SoundTouch **)&jarg1; 
  arg2 = *(SAMPLETYPE **)&jarg2; 
  argp3 = *(uint **)&jarg3; 
  if (!argp3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null uint");
    return ;
  }

请给我建议所有的变化,我需要什么做的SAMPLETYPE正确地编译NDK并生成SO文件。

Please suggest me what all changes I need to make on the SAMPLETYPE to compile NDK properly and to generate SO file.

推荐答案

这似乎你错过了一个头。请确保您有:

It's seem you missed a header. Make sure you have:

#include "soundtouch/include/SoundTouch.h"

using namespace soundtouch;

这篇关于Soundtouch库编译问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆