We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey I am trying to understand correct way to create bindings to any external C libs.
C lib - https://github.com/wooorm/levenshtein.c
rubex file
lib "<levenshtein.h>" unsigned int levenshtein(char *a, char *b) end class Lev def self.distance(a, b) return levenshtein(a, b) end end
Error
>:~/Desktop/c/levenshtein.c$ rubex lev.rubex creating Makefile >:~/Desktop/c/levenshtein.c$ cd lev/ >:~/Desktop/c/levenshtein.c/lev$ ruby extconf.rb // added all lib files creating Makefile >:~/Desktop/c/levenshtein.c/lev$ make compiling lev.c compiling __rubex__common_utils_.c linking shared-object /home/arjun/Desktop/c/levenshtein.c/lev/lev.so >:~/Desktop/c/levenshtein.c/lev$ ruby rb_lev.rb #<Lev:0x0055a47eb7f868> ruby: symbol lookup error: /home/arjun/Desktop/c/levenshtein.c/lev/lev.so: undefined symbol: levenshtein >:~/Desktop/c/levenshtein.c/lev$ ls extconf.rb levenshtein.c lev.h lev.so rb_lev.rb __rubex__common_utils_.h lev.c levenshtein.h lev.o Makefile __rubex__common_utils_.c __rubex__common_utils_.o
Why am I getting this error?
Rubex - 0.1.2 Ruby 2.3.3
The text was updated successfully, but these errors were encountered:
Hi Any updates on this? Is there any condition on the type of C libs we can link with Rubex?
Sorry, something went wrong.
No branches or pull requests
Hey
I am trying to understand correct way to create bindings to any external C libs.
C lib - https://github.com/wooorm/levenshtein.c
rubex file
Error
Why am I getting this error?
Rubex - 0.1.2
Ruby 2.3.3
The text was updated successfully, but these errors were encountered: