Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Help with adding header files for 'mkmf' - new to Swig/mkmf

Thread Tools

Help with adding header files for 'mkmf' - new to Swig/mkmf
Posts: n/a

I'm trying to extend a simple function from a large C++ API library
for Ruby (OpenAccess). Ultimately I'd like to add functionality over
time; however, I want to get a simple test case up and running as a
proof-of-concept. I believe the problem is properly pointing to the
large C++ library. Let me begin with the problem seen (after using
Swig and extconf.rb):

irb(main):001:0> require 'libtest'
LoadError: ./ undefined symbol:
_ZNK12OpenAccess_46oaFile6existsEv - ./
from ./
from (irb):1

In my libtest.cpp file I have:

#include "oaDesignDB.h"

And in my extconf.rb file:

require 'mkmf'
$libs = append_library($libs, "supc++")

# This does not seem to add the path to the "-I" option in the make
# even though the header is found.
find_header('oaDesignDB.h', '/path/to/the/header')

# And this does not work also even though $INCFLAGS has a value before
# as "-I$(topdir)" and with the added path afterwards... it just
doesn't get
# into the make file for some reason
# $INCFLAGS += " -I#{path}"


Reply With Quote

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
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
UNIX header files to Windows header files C Programming 3 05-01-2006 03:57 PM
Header files included in header files John Smith C Programming 18 07-24-2004 04:55 AM
What is better /standard for creating files. a cpp file with header or cpp and seperate file for header DrUg13 C++ 1 02-10-2004 09:20 AM
Adding a new web method gets me the "Server did not recognize the value of HTTP Header SOAPAction" error Steve Evans ASP .Net Web Services 2 01-20-2004 06:09 AM