[英]Building GSL (GNU Scientific Library) in Windows for use with VS2015
I am trying to build GSL as a library(DLL,lib) to use with my application. 我正在尝试将GSL构建为要与我的应用程序一起使用的库(DLL,lib)。 I have tested both GSL ports(gladman) to VS and CMake route and I do not want to go that path due to various reasons. 我已经测试了VS和CMake路由的两个GSL端口(gladman),由于种种原因,我不想走那条路。
Currently I am using nuget version and I am not too happy about it as some functions are missing. 目前,我正在使用nuget版本,但由于缺少某些功能,对此我不太满意。 I want to build it myself to be absolutely sure about what I am getting. 我想自己构建它,以完全确定自己会得到什么。 The objective is to build four set of dll and libs---win32, win32d, win64 and win64d. 目的是构建四组dll和libs --- win32,win32d,win64和win64d。
I know that from a MinGW library I can build lib file(for VS2015) and thereafter dll using Microsoft LIB tool if I have DEF file available. 我知道从MinGW库中,如果我有DEF文件可用,则可以构建lib文件(用于VS2015),然后使用Microsoft LIB工具构建dll。
My open source experience is very limited. 我的开源经验非常有限。 Till now I have successfully built gsl for MinGW using ./config, make, make install. 到目前为止,我已经成功使用./config、make、make install为MinGW构建了gsl。 But I am not finding any DEF file generated and I do not know how to utilize this build to generate required DEF and dll to be used with Microsoft Visual Studio 2015. 但是我找不到生成的任何DEF文件,而且我不知道如何利用此生成生成要与Microsoft Visual Studio 2015一起使用的所需DEF和dll。
Thank you 谢谢
Building and linking has always been a pain for me as well. 建立和链接对我来说也一直很痛苦。 For mac, I use Homebrew , which downloads frameworks and libraries through a simple one-line-command in the terminal . 对于Mac,我使用Homebrew ,它通过终端中的一个简单的单行命令下载框架和库 。 I would then simply add the library into my program by adding the directory of the libs necessary. 然后,我只需通过添加必要的libs目录将库添加到程序中。 In XCode, there was an "add framework/library"-button where I added the directories, but I'm sure there's an analogue in VS. 在XCode中,有一个“添加框架/库”按钮,我在其中添加了目录,但我确定VS中有一个类似物。
However, you seem to be using Windows (so Homebrew will not work). 但是,您似乎正在使用Windows(因此Homebrew无法正常工作)。 I searched the web for Windows versions of Homebrew, and it seems that Scoop is pretty similar. 我在网上搜索了Windows版本的Homebrew,看来Scoop非常相似。 You might want to check that out. 您可能想检查一下。
Hope this helped, despite me using different tools :) 希望尽管我使用其他工具也能有所帮助:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.