Comments (5)
Nice. Well done.
You can find more information about setting up a project using CMake here: https://github.com/fuzzylite/fuzzylite/tree/release/examples/application
You could probably copy the application CMake file, adapt it to your needs, and then export the cmake project to Visual Studio.
Although perhaps simpler would be to manually configure:
- the location of the library (.lib or .dll)
- the location of the fuzzylite headers
from help.
That's a bit odd. Some thoughts to experiment:
- Delete the path and write it again manually. Just thinking of a null character passed inadvertently before "C:" and hence the empty path.
- Try putting the fis file where you are running your code so instead of a full path you just have "rules.fis". Thinking of issues escaping path separators.
- Make sure the file exists and you can edit it with your text editor. Thinking of a different reason why the file could not be opened.
- Long shot, set the file path to
const string
and print it before passing it to the method. Also print c_str().
If nothing works, create a simple file where you try using the same tools in FuzzyLite to open the file and debug it to see why the file cannot be opened.
Let me know if any works. Cheers.
from help.
That's a bit odd. Some thoughts to experiment:
- Delete the path and write it again manually. Just thinking of a null character passed inadvertently before "C:" and hence the empty path.
- Try putting the fis file where you are running your code so instead of a full path you just have "rules.fis". Thinking of issues escaping path separators.
- Make sure the file exists and you can edit it with your text editor. Thinking of a different reason why the file could not be opened.
- Long shot, set the file path to
const string
and print it before passing it to the method. Also print c_str().If nothing works, create a simple file where you try using the same tools in FuzzyLite to open the file and debug it to see why the file cannot be opened.
Let me know if any works. Cheers.
Thanks for replying! Also (as I forgot to say earlier), amazing library!
Did step 1, nothing. I'm able to read the file's content using std::fstream
and it's working properly.
Did step 2, now it's not even catching the exception, it's just throwing this again and again:
It's curious, given that I can access the file's content just fine using std::fstream
Step 3: it exists and I can open it.
Step 4: Using const
did not work. Printing before the method prints the right path. Printing filePath.c_str()
also prints the right path.
If nothing works, create a simple file where you try using the same tools in FuzzyLite to open the file and debug it to see why the file cannot be opened.
I tried saving a simple ftest.cpp
file and doing this inside Developer Powershell for VS :
cl.exe ftest.cpp fuzzylite-static.lib C:\fuzzylite-6.0-Win64\fuzzylite-6.0\fuzzylite\release\bin\fuzzylite.lib /EHsc /MD
but got:
ftest.cpp
ftest.cpp(2): fatal error C1083: Cannot open include file: 'fl/Headers.h': No such file or directory
from help.
Thanks for your kind words.
Did you compile the library? Maybe the issue is in the compiled libraries and your version of C++ libraries. If you have not compiled the libraries, please do so following instructions from GitHub. I built those libraries about 6 years ago.
from help.
Prior to your reply I had not compiled the library, so I followed the instructions and ran build.bat
for both release and debug builds, but I'm still getting the same error when running that simple file:
cl.exe ftest.cpp fuzzylite-static.lib C:\fuzzylite-6.0-Win64\fuzzylite-6.0\fuzzylite\release\bin\fuzzylite.lib /EHsc /MD
ftest.cpp
ftest.cpp(2): fatal error C1083: Cannot open include file: 'fl/Headers.h': No such file or directory
I get the sense that I'm doing something very wrong so I'm grateful for the patience anyways.
EDIT: sorry for the slowness, I didn't realize the source code wasn't in the same folder as the fl
folder (which is the fuzzylite
folder). I managed to make it work and it is compiling just fine using:
cl.exe ftest.cpp C:\fuzzylite-6.0-Win64\fuzzylite-6.0\fuzzylite\release\bin\fuzzylite-static.lib /EHsc /MD
Now I just need to figure out how to make it work in Visual Studio. Thanks.
from help.
Related Issues (13)
- Can Qt/FuzzyLite library be accessible in managed code (.NET application)? HOT 1
- Linking problem Visual Studio C++ HOT 1
- Surface plot HOT 1
- Documentation links to code not working HOT 1
- Issues about Outputs HOT 1
- Problem with unassigned input variables HOT 1
- Newbie trouble with building library with CMakeList HOT 2
- QtFuzzLite 6 Internal Error HOT 1
- 'not' and 'any' HOT 2
- "[file error] file <> could not be opened" (update) HOT 7
- Problem with using output variable as input variable in C++ HOT 5
- Implementing a Mean 3Pi aggregation operator with Pyfuzzylite HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from help.