home Forums # Technical Support How can I compile this with CodeBlocks?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #2241


    I am working on a large C++ project, with CodeBlocks as the IDE in Windows 10 on a 32-bit machine, and would like to try introducing some fuzzy logic to solve a problem within the project.

    So, I suppose I should compile FuzzyLite into libraries, and link them into my main project. However, I’m having trouble compiling FuzzyLite within CodeBlocks.

    What I tried:

    Installed CMake
    Unzipped FuzzyLite
    > cd fuzzylite
    > mkdir build
    > cd build
    > cmake .. -G”CodeBlocks – MinGW Makefiles”
    Loaded up the fuzzylite.cbp project file in CodeBlocks

    Now I get lots of error messages, including the following:
    Console.cpp|114|error: use of deleted function ‘fl::Exception::Exception(fl::Exception&&)’
    Console.cpp|714|error: ‘to_string’ is not a member of ‘std’

    Am I doing something wrong?



    Hi Hugo,

    thank you for your post.

    The error messages you show seem relative to C++11. Assuming you are using fuzzylite 5, you should pass the following flag to CMake
    -DFL_CPP11=OFF to disable C++11 and compile with C++98: cmake .. -G"CodeBlocks – MinGW Makefiles" -DFL_CPP11=OFF.

    Also, I have never compiled fuzzylite using MinGW and I am not sure it would compile. Please, let me know if you manage to compile fuzzylite on MinGW and if tweaks were needed to do so. You might want to try compiling for NMake files instead of MinGW using cmake .. -G"CodeBlocks - NMake Makefiles".

    Lastly, I have never used CodeBlocks or the CMake exporter to CodeBlocks. In fact, I think you do not need to export to CodeBlocks project. My advice would be to build fuzzylite from NMake files , and configure your project to include the fuzzylite libraries and headers. Is there any reason in particular that you want to create a CodeBlocks project for fuzzylite?




    im working with fuzzylite 4.0 to generate c++ code for controlling quadrotor using fuzzy logic , but when i try to compile the simple c++ example (food and service ) using CodeBlocks as the IDE in ubuntu 14.04 i get this error
    undefined reference to ‘fl::engine::engine(std::string const&)’

    in this line :

    l::Engine* engine = new fl::Engine;

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.