[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01967] ":symbol undefined " in my extension library

From: "Jasper Huijsmans" <j.b.huijsmans@...>
Date: 2000-03-17 13:33:41 UTC
List: ruby-talk #1967
Hello,

I'm trying to write a ruby extension to the newt library (used in redhat's
installer, based on slang). I don't really know how to program in C, so I am
learning along the way.
I have put in the first basic functions and tried to compile as described in
README.EXT. Much to my surprise it worked.

Now when I try to use the library I get an error: symbol undefined
'newtInit' ... This is the first function in the module. It does so with any
other function if I change the order.

I've implemented the funcion like this:

static VALUE
newtinit(void)
{
    newtInit();
}
...
void Init_newtlib(void)
{
    mNewt=rb_define_module("Newt")

    rb_define_module_function(mNewt,"newtinit",newtinit,0)

...
}

Am I doing something really stupid here? (By the way, the name of the
function is right. I can call it like this in a C program.

in extconf.rb I put the lines
$CFLAGS=-I/usr/include
$LDFLAGS=-lnewt

Jasper Huijsmans

In This Thread

Prev Next