1

I am trying to build GSL as a library(DLL,lib) to use with my application. 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.

Currently I am using nuget version and I am not too happy about it as some functions are missing. 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.

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.

My open source experience is very limited. Till now I have successfully built gsl for MinGW using ./config, make, make install. 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.

Thank you

Santosh Kumar
  • 143
  • 12

1 Answers1

0

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. I would then simply add the library into my program by adding the directory of the libs necessary. In XCode, there was an "add framework/library"-button where I added the directories, but I'm sure there's an analogue in VS.

However, you seem to be using Windows (so Homebrew will not work). I searched the web for Windows versions of Homebrew, and it seems that Scoop is pretty similar. You might want to check that out.

Hope this helped, despite me using different tools :)

Simon Sirak
  • 195
  • 8
  • 1
    Thanks Simon, will surely help when I build in Mac as my application is cross platform. But I need to build for windows myself as I need to take care of debug, versioning, distribution and licenses as well. – Santosh Kumar Jul 18 '17 at 04:59
  • Perhaps the accepted solution [here](https://stackoverflow.com/questions/4445418/how-do-i-add-additional-libraries-in-c) will allow you to successfully add your library. Try that solution in combination with Scoop. I believe Scoop downloads everything to your home directory, so the added directory should be something like **/**. Best of luck :) – Simon Sirak Jul 18 '17 at 08:11