I am building a Ruby C Extension on Windows which requires some external C libraries, specifically libcurl and its dependancies. I have the curllib dll's and .a files. However when I build with extconf.rb it always links the libraries dynamically which requires someone to have curl installed and in their windows path to use the compiled extension. Instead I want extconf.rb to link curl and its dependancies statically so that anyone can use the extension on windows without having to add curllib to their path first.
This is my extconf.rb
require 'mkmf'
# Name the extension.
extension_name = 'ConnectionManager'
dir_config("curl")
# Make sure the cURL library is installed.
have_library("curl")
# Create the Makefile.
create_makefile(extension_name)
This is the command I am generating my makefile with
ruby extconf.rb --with-curl-dir=C:/Knapsack/x86-windows
Is there something that I can add to my extconf.rb file or command to force ruby to link the external libraries to my c extension statically? Any help would be appreciated and please let me know if you need any more information.