How to correctly require my own DLL in ruby 1.9.1?

Discussion in 'Ruby' started by David Lee, Mar 27, 2009.

  1. David Lee

    David Lee Guest

    I made a example.dll by using SWIG with Visual C++ Express 2008 Edition
    base on the ruby 1.9.1 p0 binary downloaded from Ruby website.

    However, when I run require 'example' in my ruby codes, it always
    complain following messages.

    C:\Documents and Settings\davidlee\My Documents\Visual Studio
    2008\Projects\test\Release>ruby test1.rb
    test1.rb:1:in `require': no such file to load -- example (LoadError)
    from test1.rb:1:in `<main>'

    I am sure my example.dll was already under the current working
    directory.
    Who can help me on this issue?
    Thanks.
    --
    Posted via http://www.ruby-forum.com/.
    David Lee, Mar 27, 2009
    #1
    1. Advertising

  2. Hi,

    At Fri, 27 Mar 2009 16:53:49 +0900,
    David Lee wrote in [ruby-talk:332239]:
    > C:\Documents and Settings\davidlee\My Documents\Visual Studio
    > 2008\Projects\test\Release>ruby test1.rb
    > test1.rb:1:in `require': no such file to load -- example (LoadError)
    > from test1.rb:1:in `<main>'
    >
    > I am sure my example.dll was already under the current working
    > directory.


    Rename it as example.so. 1.9 doesn't use .dll extension
    anymore.

    --
    Nobu Nakada
    Nobuyoshi Nakada, Mar 27, 2009
    #2
    1. Advertising

  3. David Lee

    David Lee Guest

    Nobuyoshi Nakada wrote:
    > Hi,
    >
    > At Fri, 27 Mar 2009 16:53:49 +0900,
    > David Lee wrote in [ruby-talk:332239]:
    >> C:\Documents and Settings\davidlee\My Documents\Visual Studio
    >> 2008\Projects\test\Release>ruby test1.rb
    >> test1.rb:1:in `require': no such file to load -- example (LoadError)
    >> from test1.rb:1:in `<main>'
    >>
    >> I am sure my example.dll was already under the current working
    >> directory.

    >
    > Rename it as example.so. 1.9 doesn't use .dll extension
    > anymore.


    It works just as you said.
    Thanks a lot!
    --
    Posted via http://www.ruby-forum.com/.
    David Lee, Mar 27, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,687
  2. Stefan Siegl
    Replies:
    1
    Views:
    768
  3. Saverio M.
    Replies:
    0
    Views:
    509
    Saverio M.
    Jul 3, 2006
  4. H. Simpson
    Replies:
    4
    Views:
    258
    H. Simpson
    Aug 3, 2004
  5. Adlai
    Replies:
    7
    Views:
    113
    Joel VanderWerf
    May 23, 2009
Loading...

Share This Page