- Sort Posts
- 6 replies
- Last post
Re: Unsatisfied Link Error
Unsatisfied Link Error
Try unquoting the argument to loadLibrary, so that it is com.qualcomm.QCARSamples.ImageTargets.ImageTargets.loadLibrary(NATIVE_LIB_SAMPLE);
Also you should see log messages indicating whether the library has been loaded successfully ..
/** A helper for loading native libraries stored in "libs/armeabi*". */
public static boolean loadLibrary(String nLibName)
{
try
{
System.loadLibrary(nLibName);
DebugLog.LOGI("Native library lib" + nLibName + ".so loaded");
return true;
}
catch (UnsatisfiedLinkError ulee)
{
DebugLog.LOGE("The library lib" + nLibName +
".so could not be loaded");
}
catch (SecurityException se)
{
DebugLog.LOGE("The library lib" + nLibName +
".so was not allowed to be loaded");
}
return false;
}
Unsatisfied Link Error
Hi,
I have the same message on logcat. First I add my own method to ImagenTargets.cpp and then I tried to load the library to my new class but I recieved that error. This is the code I use in the new class:
// Name of the native dynamic libraries to load:
private static final String NATIVE_LIB_SAMPLE = "ImageTargets";
public native int[] getCoordinates(double[] cord);
static
{
com.qualcomm.QCARSamples.ImageTargets.ImageTargets.loadLibrary(NATIVE_LIB_SAMPLE);
}
Unsatisfied Link Error
I realize of the first issue just after post it. But I recieve the same message and also this one(Cartel is my new class):
08-14 18:54:28.015: W/dalvikvm(10229): No implementation found for native Lcom/qualcomm/QCARSamples/ImageTargets/Cartel;.getCoordinates ([D)[I
Looks like you have not built the required libraries.
Did you do "ndk-build" in your project directory?