在Visual Studio 2010中使用fuzzylite [英] Using fuzzylite in Visual Studio 2010

查看:591
本文介绍了在Visual Studio 2010中使用fuzzylite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人做过这个?我不能让它工作。
以下是我的步骤:


  1. 链接

  2. 我可以运行qfuzzylite(gui-tool)没有任何问题。现在我想在我的Visual Studio + Qt集成项目中使用fuzzylite lib。
  3. 在CMake GUI中,我将fuzzylite源文件夹作为输入文件夹,并选择Visual Studio 2010作为编译器。

  4. 我可以在CMake中生成Visual Studio fuzzylite解决方案,但没有任何错误。

  5. 然后,我尝试构建Visual Studio解决方案,它失败有一些奇怪的错误。但是,它确实生成了fuzzylite-dbg.lib文件(我需要的)。

  6. 然后我使用这个lib文件和fuzzylite.dll,并包括在VS的头的路径项目。
  7. fl :: Engine * engine =

    新的fl :: Engine(simple-dimmer);


>

 异常文本:错误分配
异常类型:class std :: bad_alloc


解决方案

好,得到了:)



未来参考的步骤:


  1. 链接

  2. 在CMake GUI中,我将fuzzylite源文件夹作为输入文件夹,并选择Visual Studio 2010作为编译器。现在,如果你想使用调试模式下的lib 打开FL_DEBUG框(这是我错了)

  3. 现在点击生成将产生5个专案:

    • ALL_BUILD

    • fl-bin


    • fl-static

    • INSTALL

    • ZERO_CHECK

    li>

现在,在fl-bin,shared和static的项目属性中,转到项目属性。在C / C ++中去FL_DATA =mm.dd.yyyy到mm.dd.yyyy(奇怪)的预处理器去除空间
解决方案应该构建良好,并将在lib文件夹中生成fuzzylite-dbg.dll和fuzzylite-dbg.lib。



在VC项目中使用这些文件通过添加fuzzy-dbg.lib作为链接器输入并将dll放在解决方案文件夹中。给路径path\to\fuzzylite\fuzzylite。



对发布模式执行相同的过程(不要勾选FL_DEBUG标志)


Has anyone done this before ? I am not able to get it to work. Following are my steps:

  1. Download the windows package from link
  2. I can run qfuzzylite (gui-tool) without any problem. Now I want to use the fuzzylite lib in my Visual Studio + Qt Integration Project.
  3. In the CMake GUI I give fuzzylite source folder as the input folder and select Visual Studio 2010 as the compiler.
  4. I am able to generate the Visual Studio fuzzylite solution in CMake without any errors.
  5. Then, I tried to build the Visual Studio solution, but it fails with some weird errors. However, it does generate the fuzzylite-dbg.lib file (which I need).
  6. Then I use this lib file and the fuzzylite.dll and include the path to the Headers in the VS Project. The project builds without any errors.
  7. Now in the code I am doing

    fl::Engine* engine = new fl::Engine("simple-dimmer");

This fails with the following exception:

exception text: bad allocation
exception type: class std::bad_alloc

解决方案

Ok, got it :)

Here are the steps for future reference:

  1. Download the windows package from link
  2. In the CMake GUI I give fuzzylite source folder as the input folder and select Visual Studio 2010 as the compiler. Now, if you want to use the lib in Debug mode tick the FL_DEBUG box (this is where I went wrong)
  3. Now on clicking "generate", it will generate 5 projects:
    • ALL_BUILD
    • fl-bin
    • fl-shared
    • fl-static
    • INSTALL
    • ZERO_CHECK

Now in the Project properties in fl-bin, shared and static go to the Project Properties. In C/C++ go to Preprocessor get rid of the space in FL_DATA="mm.dd.yyyy " to "mm.dd.yyyy" (weird). The solution should build fine and will generate fuzzylite-dbg.dll and fuzzylite-dbg.lib in the lib folder.

Use these files in your VC Project by adding the fuzzy-dbg.lib as the linker input and place the dll in the solution folder. Give the path "path\to\fuzzylite\fuzzylite." to the Include Directories.

Do the same process for Release mode (don't tick the FL_DEBUG flag)

这篇关于在Visual Studio 2010中使用fuzzylite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆