Giter VIP home page Giter VIP logo

Comments (5)

jcrada avatar jcrada commented on July 19, 2024 1

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:

  1. the location of the library (.lib or .dll)
  2. the location of the fuzzylite headers

from help.

jcrada avatar jcrada commented on July 19, 2024

That's a bit odd. Some thoughts to experiment:

  1. Delete the path and write it again manually. Just thinking of a null character passed inadvertently before "C:" and hence the empty path.
  2. 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.
  3. 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.
  4. 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.

gabrielgcma avatar gabrielgcma commented on July 19, 2024

That's a bit odd. Some thoughts to experiment:

  1. Delete the path and write it again manually. Just thinking of a null character passed inadvertently before "C:" and hence the empty path.
  2. 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.
  3. 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.
  4. 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:

image

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.

jcrada avatar jcrada commented on July 19, 2024

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.

gabrielgcma avatar gabrielgcma commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.