Aller au contenu

Pouvez vous jeter un coup d'oeil à mon code?


Recommended Posts

static jboolean libinit(JNIEnv *env, jobject obj, jint sdk) { __android_log_print(ANDROID_LOG_INFO,"liblossless","libinit: sdk=%d",sdk); if (! libhandle) { if(sdk > 8) libhandle = dlopen("/data/data/net.avs234/lib/libatrack9.so", RTLD_NOW); else libhandle = dlopen("/data/data/net.avs234/lib/libatrack8.so", RTLD_NOW); } else { //libhandle = dlopen("/data/data/net.avs234/lib/libatrack9.so", RTLD_NOW);

libmedia_pause = (typeof(libmedia_pause)) dlsym(libhandle,"libmedia_pause");

libmedia_resume = (typeof(libmedia_resume)) dlsym(libhandle,"libmedia_resume");

libmedia_start = (typeof(libmedia_start)) dlsym(libhandle,"libmedia_start");

libmedia_stop = (typeof(libmedia_stop)) dlsym(libhandle,"libmedia_stop");

libmedia_write = (typeof(libmedia_write)) dlsym(libhandle,"libmedia_write");

libmediacb_start = (typeof(libmediacb_start)) dlsym(libhandle,"libmediacb_start");

libmediacb_stop = (typeof(libmediacb_stop)) dlsym(libhandle,"libmediacb_stop");

libmediacb_write = (typeof(libmediacb_write)) dlsym(libhandle,"libmediacb_write");

libmediacb_wait_done = (typeof(libmediacb_wait_done)) dlsym(libhandle,"libmediacb_wait_done");

}

}

__android_log_print(ANDROID_LOG_INFO,"liblossless","libinit: handle=%p",libhandle);

return libhandle != 0;

à la compilation sous cygwin : erreur dans ce morceau de code

le code complet se trouve ici :

http://code.google.com/p/andless/source/browse/trunk/jni/main.c?r=88

merci de pouvoir m'aider car je galère vraiment!!!!!

Voici ou est l'erreur

$ /cygdrive/c/androidndk4/ndk-build

Install : libatrack8.so => /cygdrive/c/androidndk4/apps/lossless/project/libs/armeabi :<==OK

Install : libatrack9.so => /cygdrive/c/androidndk4/apps/lossless/project/libs/armeabi :<==OK

PB:

Compile arm : lossless <= /cygdrive/c/androidndk4/apps/lossless/project/jni/m

ain.c

/cygdrive/c/androidndk4/apps/lossless/project/jni/main.c: In function 'libinit':

/cygdrive/c/androidndk4/apps/lossless/project/jni/main.c:238: warning: no return

statement in function returning non-void

/cygdrive/c/androidndk4/apps/lossless/project/jni/main.c: At top level:

/cygdrive/c/androidndk4/apps/lossless/project/jni/main.c:240: error: expected ')

' before string constant

/cygdrive/c/androidndk4/apps/lossless/project/jni/main.c:241: error: expected id

entifier or '(' before 'return'

make: *** [/cygdrive/c/androidndk4/apps/lossless/project/bin/ndk/local/armeabi/o

bjs/lossless/main.o] Error 1

Lien vers le commentaire
Partager sur d’autres sites

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

×
×
  • Créer...