Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Forcing mkmf to use static libraries instead of dynamic ones

Reply
Thread Tools

Forcing mkmf to use static libraries instead of dynamic ones

 
 
Wincent Colaiuta
Guest
Posts: n/a
 
      06-09-2007
I'm building a C extension on Mac OS X and I notice that the Makefile
created by mkmf prefers dynamic libraries over static ones.

For example, given this line in my extconf.rb file:

have_library('antlr3c', 'antlr3ParserNew')

And these installed libraries:

libantlr3c.a
libantlr3c.dylib
libantlr3c.la

The Makefile always choose s the "dylib" version... I can force it to
choose the static version and link statically to it by deleting or
moving the other libraries, but I'd like to know: is there a way to
explicitly specify my preference for the static version of the library
in my extconf.rb file?

Cheers,
Wincent

 
Reply With Quote
 
 
 
 
Nobuyoshi Nakada
Guest
Posts: n/a
 
      06-11-2007
Hi,

At Sat, 9 Jun 2007 23:20:13 +0900,
Wincent Colaiuta wrote in [ruby-talk:254934]:
> The Makefile always choose s the "dylib" version... I can force it to
> choose the static version and link statically to it by deleting or
> moving the other libraries, but I'd like to know: is there a way to
> explicitly specify my preference for the static version of the library
> in my extconf.rb file?


How can you tell your compiler and/or linker to use the static
version, even if the dylib version is also available?

--
Nobu Nakada

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with adding header files for 'mkmf' - new to Swig/mkmf james.d.masters@gmail.com Ruby 0 10-24-2007 08:19 PM
Using Mkmf to Verify Libraries Steven Hansen Ruby 2 12-06-2006 04:57 PM
compile in static library with mkmf goldfita@signalsguru.net Ruby 0 03-27-2006 04:23 AM
Hard drives--Are big ones more delicate than smaller ones? PowerPost2000 Computer Support 2 03-01-2005 10:30 PM
static libraries with extconf.rb/mkmf maillist@bestworldweb.homelinux.com Ruby 0 08-01-2003 07:27 AM



Advertisments