home Forums # Technical Support how compile fuzzylite 5.0 for android

This topic contains 6 replies, has 3 voices, and was last updated by Juan Rada-Vilela (admin) Juan Rada-Vilela (admin) 4 years, 3 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1805 Reply
    Avatar
    mehrang
    Participant

    hi
    how compile fuzzylite 5.0 for android?
    I need compile fuzzylite for android becuase I write a program with c++ and compile it with ndk and eclipse for android.

    Excuse me for my bad English language. 🙂

    #1806 Reply

    Hi,

    thank you for your post and interesting question.

    I am not sure how to build fuzzylite using the Android NDK, but searching the web I came across these posts using CMake:

    https://github.com/taka-no-me/android-cmake

    http://stackoverflow.com/questions/19207721/build-android-ndk-project-with-cmake

    However, you should be able to build fuzzylite just changing the C++ toolchain to the Android toolchain and making sure to define the variables found in the fuzzylite CMake script.

    I am be very interested in finding out what solution you find most appropriate.

    Cheers.

    #1814 Reply
    Avatar
    mehrang
    Participant

    Thanks for your guidance.
    I compile library but it has a problem.
    I’d describe my work if there is a mistake in the way, I am grateful for your guidance.
    I used android-cmake-master.
    1. cmake:
    MinGW Makefiles–>specify toolchin file for cross-compiling–> select android.toolchain.cmake from android-cmake-master.

    set Cmake_Make_PROGRAM=C:/android-ndk-r10d/prebuilt/windows-x86_64/bin/make.exe

    add ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.8 (for example) (TYPE=string)
    ANDROID_NDK=C:/android-ndk-r10d/ (TYPE=Path)

    configure…

    generate…

    run cmd..
    2)
    go to fuzzylite directory
    run C:\android-ndk-r10d\prebuilt\windows-x86_64\bin\make.exe -f
    Makefile
    to link files errors
    then

    run C:\android-ndk-r10d\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.exe -shared -fno-rtti -fPIC -fno-exceptions -o bin\libfuzzylite.so CMakeFiles/fl-shared.dir/src/Console.cpp.o CMakeFiles/fl-shared.dir/src/defuzzifier/Bisector.cpp.o CMakeFiles/fl-shared.dir/src/defuzzifier/Centroid.cpp.o CMakeFiles/fl-shared.dir/src/defuzzifier/IntegralDefuzzifier.cpp.o CMakeFiles/fl-shared.dir/src/defuzzifier/LargestOfMaximum.cpp.o CMakeFiles/fl-shared.dir/src/defuzzifier/MeanOfMaximum.cpp.o CMakeFiles/fl-shared.dir/src/defuzzifier/SmallestOfMaximum.cpp.o CMakeFiles/fl-shared.dir/src/defuzzifier/WeightedAverage.cpp.o CMakeFiles/fl-shared.dir/src/defuzzifier/WeightedDefuzzifier.cpp.o CMakeFiles/fl-shared.dir/src/defuzzifier/WeightedSum.cpp.o CMakeFiles/fl-shared.dir/src/Engine.cpp.o CMakeFiles/fl-shared.dir/src/Exception.cpp.o CMakeFiles/fl-shared.dir/src/factory/CloningFactory.cpp.o CMakeFiles/fl-shared.dir/src/factory/ConstructionFactory.cpp.o CMakeFiles/fl-shared.dir/src/factory/DefuzzifierFactory.cpp.o CMakeFiles/fl-shared.dir/src/factory/FactoryManager.cpp.o CMakeFiles/fl-shared.dir/src/factory/FunctionFactory.cpp.o CMakeFiles/fl-shared.dir/src/factory/HedgeFactory.cpp.o CMakeFiles/fl-shared.dir/src/factory/SNormFactory.cpp.o CMakeFiles/fl-shared.dir/src/factory/TermFactory.cpp.o CMakeFiles/fl-shared.dir/src/factory/TNormFactory.cpp.o CMakeFiles/fl-shared.dir/src/fuzzylite.cpp.o CMakeFiles/fl-shared.dir/src/hedge/Any.cpp.o CMakeFiles/fl-shared.dir/src/hedge/Extremely.cpp.o CMakeFiles/fl-shared.dir/src/hedge/Not.cpp.o CMakeFiles/fl-shared.dir/src/hedge/Seldom.cpp.o CMakeFiles/fl-shared.dir/src/hedge/Somewhat.cpp.o CMakeFiles/fl-shared.dir/src/hedge/Very.cpp.o CMakeFiles/fl-shared.dir/src/imex/CppExporter.cpp.o CMakeFiles/fl-shared.dir/src/imex/Exporter.cpp.o CMakeFiles/fl-shared.dir/src/imex/FclExporter.cpp.o CMakeFiles/fl-shared.dir/src/imex/FclImporter.cpp.o CMakeFiles/fl-shared.dir/src/imex/FisExporter.cpp.o CMakeFiles/fl-shared.dir/src/imex/FisImporter.cpp.o CMakeFiles/fl-shared.dir/src/imex/FldExporter.cpp.o CMakeFiles/fl-shared.dir/src/imex/FllExporter.cpp.o CMakeFiles/fl-shared.dir/src/imex/FllImporter.cpp.o CMakeFiles/fl-shared.dir/src/imex/Importer.cpp.o CMakeFiles/fl-shared.dir/src/imex/JavaExporter.cpp.o CMakeFiles/fl-shared.dir/src/main.cpp.o CMakeFiles/fl-shared.dir/src/norm/s/AlgebraicSum.cpp.o CMakeFiles/fl-shared.dir/src/norm/s/BoundedSum.cpp.o CMakeFiles/fl-shared.dir/src/norm/s/DrasticSum.cpp.o CMakeFiles/fl-shared.dir/src/norm/s/EinsteinSum.cpp.o CMakeFiles/fl-shared.dir/src/norm/s/HamacherSum.cpp.o CMakeFiles/fl-shared.dir/src/norm/s/Maximum.cpp.o CMakeFiles/fl-shared.dir/src/norm/s/NilpotentMaximum.cpp.o CMakeFiles/fl-shared.dir/src/norm/s/NormalizedSum.cpp.o CMakeFiles/fl-shared.dir/src/norm/t/AlgebraicProduct.cpp.o CMakeFiles/fl-shared.dir/src/norm/t/BoundedDifference.cpp.o CMakeFiles/fl-shared.dir/src/norm/t/DrasticProduct.cpp.o CMakeFiles/fl-shared.dir/src/norm/t/EinsteinProduct.cpp.o CMakeFiles/fl-shared.dir/src/norm/t/HamacherProduct.cpp.o CMakeFiles/fl-shared.dir/src/norm/t/Minimum.cpp.o CMakeFiles/fl-shared.dir/src/norm/t/NilpotentMinimum.cpp.o CMakeFiles/fl-shared.dir/src/Operation.cpp.o CMakeFiles/fl-shared.dir/src/rule/Antecedent.cpp.o CMakeFiles/fl-shared.dir/src/rule/Consequent.cpp.o CMakeFiles/fl-shared.dir/src/rule/Expression.cpp.o CMakeFiles/fl-shared.dir/src/rule/RuleBlock.cpp.o CMakeFiles/fl-shared.dir/src/rule/Rule.cpp.o CMakeFiles/fl-shared.dir/src/term/Accumulated.cpp.o CMakeFiles/fl-shared.dir/src/term/Activated.cpp.o CMakeFiles/fl-shared.dir/src/term/Bell.cpp.o CMakeFiles/fl-shared.dir/src/term/Concave.cpp.o CMakeFiles/fl-shared.dir/src/term/Constant.cpp.o CMakeFiles/fl-shared.dir/src/term/Cosine.cpp.o CMakeFiles/fl-shared.dir/src/term/Discrete.cpp.o CMakeFiles/fl-shared.dir/src/term/Function.cpp.o CMakeFiles/fl-shared.dir/src/term/Gaussian.cpp.o CMakeFiles/fl-shared.dir/src/term/GaussianProduct.cpp.o CMakeFiles/fl-shared.dir/src/term/Linear.cpp.o CMakeFiles/fl-shared.dir/src/term/PiShape.cpp.o CMakeFiles/fl-shared.dir/src/term/Ramp.cpp.o CMakeFiles/fl-shared.dir/src/term/Rectangle.cpp.o CMakeFiles/fl-shared.dir/src/term/Sigmoid.cpp.o CMakeFiles/fl-shared.dir/src/term/SigmoidDifference.cpp.o CMakeFiles/fl-shared.dir/src/term/SigmoidProduct.cpp.o CMakeFiles/fl-shared.dir/src/term/Spike.cpp.o CMakeFiles/fl-shared.dir/src/term/SShape.cpp.o CMakeFiles/fl-shared.dir/src/term/Term.cpp.o CMakeFiles/fl-shared.dir/src/term/Trapezoid.cpp.o CMakeFiles/fl-shared.dir/src/term/Triangle.cpp.o CMakeFiles/fl-shared.dir/src/term/ZShape.cpp.o CMakeFiles/fl-shared.dir/src/variable/InputVariable.cpp.o CMakeFiles/fl-shared.dir/src/variable/OutputVariable.cpp.o CMakeFiles/fl-shared.dir/src/variable/Variable.cpp.o -L. “C:/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libgnustl_shared.so” “C:/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libsupc++.a”

    successfully build .so

    but when add and load this library to eclipse and run application this error shows “dlopen failed: dlopen failed: cannot locate symbol “ioctl” referenced by”

    #1815 Reply

    Hi,

    thank you for your post.

    I am afraid your issue is related to Android and not fuzzylite. Please, check https://groups.google.com/forum/#!topic/libbulldog/ePFJt5VkUOg

    Also, I have never built fuzzylite on MinGW. It would be worth checking that the binaries built work fine, perhaps run the executable fuzzylite to make sure it works fine.

    #1821 Reply
    Avatar
    mehrang
    Participant

    OK, thank you for your guidance.

    #1895 Reply
    Avatar
    chenqi
    Participant

    I create a standard android project makefile for fuzzylite at https://github.com/9468305/fuzzylite which fork from https://github.com/fuzzylite/fuzzylite.
    It seems all right.
    I will try to run test and send pull request to main fuzzylite project.
    You can try this way.
    It’s very simple, just run build_ndk.bat. (It will call android ndk-build with Android.mk)

    #1898 Reply

    Hi chenqi,

    thank you for your post and your contribution.

    Cheers.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: how compile fuzzylite 5.0 for android
Your information: