views:

216

answers:

1

Hello,

I would be thankful for any help on this: I want to write an extension to my c library. I created file zmq.cpp that uses library libzmq (written in C++).

I created makefile using ruby extconf.rb, then I run nmake. It all went fine. Nmake generated files

librbzmq-i386-mswin32.def
librbzmq-i386-mswin32.lib
librbzmq-i386-mswin32.exp
librbzmq.so librbzmq.so.manifest

This all was done in Windows XP.

Then I have a test program, that in my first line has:

require 'librbzmq'

When I try to run my test program using

ruby -I"C:\Documents and Settings\Kustarova\wcopy\trunk\librbzmq\librbzmq-i386-mswin32.lib" -I"C:\Documents and Settings\Kustarova\wcopy\trunk\windows\Debug\libzmq.lib" ./rb_remote_lat.rb

I get

rb-remote_lat.rb:1:in `require':no such file to load -- librbzmq (LoadError) from ./rb_remote_lat.rb:1:in `<main>'

The file locations are correct, I checked it.

Do you have any idea how to run it?

Note: I did all this in ubuntu and it worked fine - I created makefile, and was able to run the test application using similar command as here (only the paths were different).

Thanks

A: 

Correcting my earlier answer - it looks like the path you supply using "-I" is wrong. It should point to the directory where librbzmq.so can be found. Alternatively you can install the library using:

nmake install

or use RUBYLIB to setup search path:

set RUBYLIB="C:\Documents and Settings\Kustarova\wcopy\trunk\librbzmq"

regards

grant

grantc