本文介绍了通过SWIG编译Quantlib为C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人有任何使用经验?我目前正在研究,看到C#code可以使用痛饮生成。我们正在探索的选项来创建的使用QuantLib和专有闭源库(这很可能会提供为净DLL)的金融功能组合库。这样做是为了结合这两种以创建统一的超级库。我见过QuantLib 的来找到他们。

So it would seem that the C# bindings for SWIG are available. One needs to browse the SVN repository or list of files on SouceForge to find them.

该SWIG文件夹中包含几个子文件,这取决于您选择的语言,在我的情况的C#是我感兴趣的人。您需要先下载痛饮,它可执行文件系统 PATH 变量。

The SWIG folder contains several subfolders, depending on your language of choice, in my case C# was the one that interested me. You will need to download SWIG first and it the executable to system PATH variable.

请务必阅读的Readme.txt ,因为它包含了 QL_DIR 环境变量,也需要细节创建。

Make sure to read the Readme.txt as it contains details about the QL_DIR environment variable that also needs to be created.

这可能是VS防爆preSS的限制 - 但解决方案文件包含了C#项目和C ++项目,其中仅采用了C#或C ++部分可以随时打开。我的建议是创建单独的解决方案文件的C ++和C#项目。

This may be a limitation of VS Express - but the solution file contains both the C# project and C++ project, of which only either the C# or C++ portions can be opened at any time. My suggestion would be to created separate solution files for the C++ and the C# projects.

从.NET的背景下,LIB文件,OBJ文件和C ++相关联的所有其他爵士即将需要一些时间来让用途。

Coming from a .Net background, lib files, obj files and the all the other jazz associated with c++ takes some time to getting use to.


  1. 下载QuantLib和Boost描述

  2. 下载的焦油球<一个href=\"http://quantlib.svn.sourceforge.net/viewvc/quantlib/trunk/QuantLib-SWIG/?sortby=dateBlockquote\"相对=nofollow> QuantLib-痛饮从SourceForge 的文件夹中。 修改有一个的zip 的可供下载的主页上。其子文件夹中列出。检查在绑定的V1.0文件夹

  3. 运行位于 QuantLib-痛饮的 swig.cmd 文件\\ CSHARP 文件夹(你需要先下载痛饮() - >此产生CS封装文件Quantlib

  4. 生成C ++项目 NQuantLibc - 注意这里创建的DLL需要与NQuantlib C#创建的DLL始终发货。它需要被放置在由的DllImport 属性读取的位置。 (请参见的最新版本。

    Quantlib also build on VC++ 2010 with the latest release.

    这篇关于通过SWIG编译Quantlib为C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-17 19:32
查看更多