home › Forums › # Technical Support › fuzzylie error – use of undefined type 'T'
- This topic has 2 replies, 2 voices, and was last updated 8 years, 8 months ago by
Unknown.
-
AuthorPosts
-
January 22, 2015 at 00:32 #1633
Unknown
MemberHi
I tried to compile a C++ program with fuzzylite libraries. When compiling it gives following errors
fl/Operation.h(39): error C2027: use of undefined type ‘T’
fl/Operation.h(39): error C2226: syntax error : unexpected type ‘T’
fl/Operation.h(39): error C2334: unexpected token(s) preceding ‘:’; skipping apparent function body
fl/Operation.h(42): error C2760: syntax error : expected ‘{‘ not ‘;’
fl/Operation.h(44): error C2143: syntax error : missing ‘}’ before ”template<”
fl/Operation.h(45): error C2143: syntax error : missing ‘,’ before ‘<end Parse>’
fl/Operation.h(48): error C2143: syntax error : missing ‘)’ before ‘;’
fl/Operation.h(48): error C2238: unexpected token(s) preceding ‘;’I am using Visual studio 2010 express edition and i tried to compile it in release mode.
What would be the reason for this ?
January 22, 2015 at 12:13 #1634Juan Rada-Vilela (admin)
KeymasterHi,
I think there is a problem in the type of the Visual Studio project that you have created. I am not a regular user of VS, but perhaps make sure you have selected a Console Project.
Have you successfully built fuzzylite from the console? If so, then you need to add the INCLUDE_PATH, LIBRARY_PATH and library to your project, that is, “-I/path/to/fuzzylite”, “-L/path/to/fuzzylite/bin”, “-lfuzzylite”, respectively. These are in Unix mode, and you would need to find out how to correctly add them in your project properties.
January 22, 2015 at 17:43 #1636Unknown
MemberHi,
I already used this library for some other programs. However in this case I have linked some other 3rd party libraries along side with fuzzylite. I found a solution for this but I don’t know the exact theory behind that.
In earlier case I put “#include “fl\Headers.h” in bottom of the header file list (look at the first code segment). However when I put it at the top of the header file list (see the 2nd code segment) it works fine :).This didn’t work:
#include “stdafx.h”
#include “Aria.h”
#include “ArNetworking.h”
#include <iostream>
#include <stdio.h>
#include “fl\Headers.h” // for fuzzyliteThis works well:
#include “fl\Headers.h” // for fuzzylite
#include “stdafx.h”
#include “Aria.h”
#include “ArNetworking.h”
#include <iostream>
#include <stdio.h>Could you please explain the possible reason for this ?
-
AuthorPosts
- You must be logged in to reply to this topic.