androidandroid-ndkdevil

error: undefined reference to 'ilInit' Android DeviL


I want to use the DeviL library in my android app using NDK. I have succesfully been able to generate the header file for my main activity however in my native code when i try to initialize devil with ilLnit(); i get this error

C:/Paul/NDK/toolchains/x86-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld.exe: C:/Paul/Workspace/MyProject//obj/local/x86/objs/mylib/com_myproject_MainActivity.o: in function Java_com_myproject_MainActivity_convert:C:/Paul/Workspace/MyProject//jni/com_myproject_MainActivity.c:18: error: undefined reference to 'ilInit'

Im using eclipse on windows with the latest ADT, NDK....... I build from within eclipse (ndk-build.cmd) , building from cygwin gives me the same result. In my project properties C/C++ path and symbols i have all "Include" folders from the Devil library.


Solution

  • I had forgot to add

    LOCAL_C_INCLUDES  :=  \
    ${DEVIL_SRC_PATH}include \
    ${DEVIL_SRC_PATH}src-IL/include \
    

    In my module in the android.mk Now works like a charm