Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in README, section Getting started #80

Closed
lexruee opened this issue Jan 17, 2015 · 0 comments · Fixed by #81
Closed

Typo in README, section Getting started #80

lexruee opened this issue Jan 17, 2015 · 0 comments · Fixed by #81

Comments

@lexruee
Copy link
Contributor

lexruee commented Jan 17, 2015

This simple example in the tutorial section on the README page does not work.

extconf.rb

require 'mkmf-rice'
create_makefile('test') #should be Test?

test.cpp

#include "rice/Class.hpp"

using namespace Rice;

extern "C"
void Init_Test() {
  Class rb_cTest = define_class("Test");
}

Running irb and running require './test' results in:

 require './test'
LoadError: /home/lexruee/workspace/test-rice/test.so: undefined symbol: Init_test - /home/lexruee/workspace/test-rice/test.so
    from /home/lexruee/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/lexruee/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from (irb):1
    from /home/lexruee/.rvm/rubies/ruby-2.1.2/bin/irb:11:in `<main>'

In changing test to Test in the extconf.rb file and running irb with require './Test' solves the error.

require 'mkmf-rice'
create_makefile('Test')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant