home Forums # Technical Support How to use CMaked library of fuzzylite opensource on Windows QtCreator edition?

This topic contains 1 reply, has 2 voices, and was last updated by Juan Rada-Vilela Juan Rada-Vilela 1 week, 2 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6314
    Nandinkhuu Odko
    Nandinkhuu Odko
    Participant

    Hello everybody! I am new membership. Nice to meet you.
    I want compiled fuzzylite library to use my Qt-GUI project.

    i did its on my PC:
    -Installed Microsoft Visual Studio 2017
    -Installed Qtcreator 5.5
    -Installed CMake-gui

    Step1: download fuzzylite-release rar file and extract it. After, put path of fuzzylite folder on CMake-gui then click Configure button. After configuration, i clicked Generate button.
    Step2: After generation, I open it on Visual Studio. Thus, i click build button (Debug, Local Windows Debugger). After this process, i had got 2 compiled library (fuzzylite-debug.lib and fuzzylite-static-debug.lib)
    Step3: i open my QtGUI project then add library (external library) for .pro file. I chose lib file (fuzzylite-debug.lib) and path (C:\Users....\QtGUI\fuzzylite-release\fuzzylite).

    i got these configuration lines from .pro file

    Default rules for deployment.

    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/fuzzylite-release/fuzzylite/bin/release/ -lfuzzylite-debug
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/fuzzylite-release/fuzzylite/bin/debug/ -lfuzzylite-debug

    INCLUDEPATH += $$PWD/fuzzylite-release/fuzzylite

    DEPENDPATH += $$PWD/fuzzylite-release/fuzzylite

    Step4: After this addition libraries, go to main.cpp, include header file as “fl/Headers.h” on main.cpp. Also, I tried to use some functions of fuzzylite. But it isn’t working..
    What should I do? Is there any wrong things?
    Brohers!! Are these my steps right?
    Please help me.

    #6316
    Juan Rada-Vilela
    Juan Rada-Vilela
    Keymaster

    Hi,

    An extract of QtFuzzyLite.pro:

    
    FL_HOME=../fuzzylite-master/fuzzylite
    release:{
        FL_CONFIG=release
        FL_LIBRARY=fuzzylite-static
    }
    debug:{
        FL_CONFIG=debug
        FL_LIBRARY=fuzzylite-static-debug
    }
    INCLUDEPATH += . $${FL_HOME} \
    
    LIBS *= -L$${FL_HOME}/$${FL_CONFIG}/bin
    LIBS *= -l$${FL_LIBRARY}
    
    message("FL_HOME=$${FL_HOME}")
    message("FL_CONFIG=$${FL_CONFIG}")
    message("FL_LIBRARY=$${FL_LIBRARY}")
    

    some further ideas here: https://github.com/fuzzylite/fuzzylite/tree/release/examples/application

    my suggestion is to start simple and build on top of that.

    Cheers,

    Juan.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.