-1

I use CLion and i have a project with my teammates to simulate a robot.

I wanted to make a fuzzylite controller and i wanted to take first step to complete it.

alas, i am stuck in the first step, because the test code i've copied from This official fuzzylite website and posted to code into the CLion project and configured the cmake and built.

but I get the following errors:

    /usr/bin/ld: CMakeFiles/fuzzy.dir/main.cpp.o: in function `main':
/home/zaahm18/CLionProjects/fuzzy/main.cpp:10: undefined reference to `fl::Engine::Engine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /home/zaahm18/CLionProjects/fuzzy/main.cpp:14: undefined reference to `fl::InputVariable::InputVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double, double)'
/usr/bin/ld: /home/zaahm18/CLionProjects/fuzzy/main.cpp:20: undefined reference to `fl::Ramp::Ramp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double, double, double)'
/usr/bin/ld: /home/zaahm18/CLionProjects/fuzzy/main.cpp:21: undefined reference to `fl::Ramp::Ramp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double, double, double)'
/usr/bin/ld: /home/zaahm18/CLionProjects/fuzzy/main.cpp:24: undefined reference to `fl::OutputVariable::OutputVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double, double)'

and more.

I tried Google, YouTube etc. to find solution to these errors but none were satisfactory. i use CLion in ubuntu linux 20.04 lts. i had already installed fuzzylite 6.0 in this directory

"/home/zaahm18/fuzzylite-6.0/fuzzylite"

Where all the build.sh, headerfiles, cmakelist etc. exists.

this is my cmakelist:

cmake_minimum_required(VERSION 3.20)
project(fuzzy)

set(CMAKE_CXX_STANDARD 17)

add_executable(fuzzy main.cpp)

Is there something i am missing?

  • You are not finding or linking to the library. There is an example on the github page: [https://github.com/fuzzylite/fuzzylite/tree/release/examples/application](https://github.com/fuzzylite/fuzzylite/tree/release/examples/application) however I do admit it's not the simplest solution. – drescherjm Oct 09 '21 at 14:03
  • Is there a simpler solution? Where I can externally link it towards fl libraries and headerfiles? – Zain Ahmed Oct 09 '21 at 14:29

0 Answers0