Forum: Ruby newbie question about mkmf and dir_config

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ralph Kon (Guest)
on 2006-03-12 01:13
Please help a beginner!  I'm trying to write my first c-extension, and I
don't understand the dir_config command.  I need to include 2 .h headers
and a library for some equipment.  Does the 'name' in dir_config('name')
refer to a directory, the header file, or the library?  Do I need to
include multiple dir_config lines or multiple options in the command
line, one for each seperate file?  The pickaxe section on this wasn't
written with total beginners in mind.
Thanks,
Ralph
unknown (Guest)
on 2006-03-13 16:20
(Received via mailing list)
Hi,

At Sun, 12 Mar 2006 08:13:36 +0900,
Ralph Kon wrote in [ruby-talk:183710]:
> Please help a beginner!  I'm trying to write my first c-extension, and I
> don't understand the dir_config command.  I need to include 2 .h headers
> and a library for some equipment.  Does the 'name' in dir_config('name')
> refer to a directory, the header file, or the library?  Do I need to
> include multiple dir_config lines or multiple options in the command
> line, one for each seperate file?  The pickaxe section on this wasn't
> written with total beginners in mind.

dir_config('foo') enables --with-foo-dir option, which implies
--with-foo-include and --with-foo-lib options too, so you don't
need multiple dir_config calls.

A dir_config option has the effect on all checking methods, so
you don't need multiple options in the command line.
This topic is locked and can not be replied to.