Error importing PDFNetC to Ruby 2.0

143 views
Skip to first unread message

Oleksii Kuznietsov

unread,
May 27, 2014, 11:05:15 AM5/27/14
to pdfne...@googlegroups.com
Ubuntu 12.04 x64
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]

I'm trying to update my project from Ruby 1.9.3 which used PDFNetC for this version to Ruby 2.0. Bindings for this version are available on the site, but they actually does not work for me, raising error:

/home/nattfodd/pdf_net_project/lib/pdf_net_utils.rb:7:in `require': libPDFNetC.so: cannot open shared object file: No such file or directory - /home/nattfodd/pdf_net_project/lib/PDFNetRuby.so (LoadError)

Trying to feed my project with x32 libs gives me another error:

/home/nattfodd/pdf_net_project/lib/pdf_net_utils.rb:7:in `require': /home/nattfodd/pdf_net_project/lib/PDFNetRuby.so: wrong ELF class: ELFCLASS32 - /home/nattfodd/pdf_net_project/lib/PDFNetRuby.so (LoadError)

I've tried to compile bindings on my own using github project, but it's not that easy and provides more questions.

Thanks for helping,
Alex

Aaron

unread,
May 28, 2014, 8:34:25 PM5/28/14
to pdfne...@googlegroups.com
Hello Alex,

Thank you for letting us know that you're seeing this behaviour.  I'm having trouble reproducing it in the same environment.

Are you able to run the samples as packaged?  That is, if you download http://www.pdftron.com/downloads/PDFNetWrappers/PDFNetWrappersLinux64.tar.gz, extract it, change the directory to PDFNetWrappersLinux64/Samples/AddImageTest/RUBY, and run ./RunTest.sh, what output do you get?

Michael Scappa

unread,
Dec 20, 2014, 6:08:42 PM12/20/14
to pdfne...@googlegroups.com
I ran into a similar issue. It was because the LD_LIBRARY_PATH wasn't exported properly. In my case, running:
export LD_LIBRARY_PATH=/vagrant/PDFNetC/Lib

solved my issue
Reply all
Reply to author
Forward
0 new messages