Reputation: 33
i just write a fuzzy code with a fuzzylogic library(eFLL library). I used it in a linux environment and try to compile it with g++. i unziped the library in the g++ path. but these errors come to me and i do not know what are these for. i make a Makefile and try to solve the problem but nothing well happend. does anyone know how can i solve this problem?
a part of code is like this:
include <iostream.h>
#include "../FuzzyRule.h"
#include "../FuzzyComposition.h"
#include "../Fuzzy.h"
void setup(){
Fuzzy* fuzzy = new Fuzzy();
FuzzyInput* Threat = new FuzzyInput(1);
FuzzySet* lowThreat = new FuzzySet::FuzzySet(0, 1.875, 1.875, 3.75),
a part of errors are like this:
fuzzycode2.cpp:(.text+0x23): undefined reference to `Fuzzy::Fuzzy()'
fuzzycode2.cpp:(.text+0x61): undefined reference to `FuzzyInput::FuzzyInput(int)'
fuzzycode2.cpp:(.text+0xbb): undefined reference to `FuzzySet::FuzzySet(float, float, float, float)'
fuzzycode2.cpp:(.text+0xed): undefined reference to `FuzzyIO::addFuzzySet(FuzzySet*)'
fuzzycode2.cpp:(.text+0x129): undefined reference to `FuzzySet::FuzzySet(float, float, float, float)'
Upvotes: 0
Views: 295
Reputation: 153820
Including the headers into the C++ files isn't enough. You also need to specify the library file and possibly its location while linking, e.g.:
g++ your-files-go-here -o some-name -Llocation-of-the-library -llibrary-name
Looking at the page of this particular "library" it seems it consists of just a bunch of object files which you would need to put together into a library or include explicitly while linking.
Upvotes: 2