compile in static library with mkmf

G

goldfita

I have the following directory structure.

~/pyastman/ruby/ #ruby build dir
~/pyastman/ #code and library to wrap

The library is libast_man.a, which I want to link into my ruby
extension module at compile time. I'm not sure if this can be done
with a static library. It's not clear to me from the instructions. I
tried

require 'mkmf'
dir_config("ast_man")
have_library("ast_man","ast_connect")
create_makefile("rb_astman")

ruby extconf.rb --with-ast_man-lib=~/pyastman

It can't find the library. I tried various permutations on the names
as well. The next best thing would be to just tell it where the object
file is or even recompile the library. But I couldn't figure out how
to do this with mkmf either.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top