home › Forums › # Technical Support › How can I compile this with CodeBlocks?
Tagged: CodeBlocks compiling
- This topic has 2 replies, 3 voices, and was last updated 6 years, 5 months ago by Unknown.
September 18, 2016 at 10:41 #2241UnknownMember
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:
> 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?
HugoSeptember 20, 2016 at 09:58 #2242Juan Rada-Vilela (admin)Keymaster
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=OFFto 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?
Juan.October 20, 2016 at 13:34 #2264UnknownMember
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;
- You must be logged in to reply to this topic.