From: Tobias Peters Date: 2003-09-29T17:34:32+09:00 Subject: Re: Two problems creating a C++ extension to Ruby On Sun, 28 Sep 2003, Lyle Johnson wrote: > Matthew Miller wrote: > > > for the second argument the test fails. I've gotten around this by not doing > > a library test and just calling create_makefile and then editing the > > resulting makefile by hand to have the extension .so linked against > > libid3.so. > > Since libid3.so is not optional in this case, I think it is OK to just > assume that it's there. To avoid having to edit the Makefile, though, > try adding this line to your extconf.rb script before the final call to > create_makefile(): > > $libs = append_library($libs, "id3") Matthew can also use the have_library function without a second argument. In this case, ruby will use "main" as the default. "main" is of course defined by the test program itself, so it will not be the cause of any error. The linker will nonetheless complain if it cannot find the library, it just won't check for any symbols in that library. Tobias