Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JNI issue: symbol lookup error by FileHandle in C++ DLL

I made JNI functions and linked them with the c++ dynamic library successfully. I got all of them working just fine, but I had an issue for one function, I got symbol lookup error from the FileHandle class that I used in the c++ that I use to read data from file. Knowing that it's working on a normal c++ project, but not in the DLL.

/usr/lib/jvm/jdk1.7.0/bin/java: symbol lookup error: /home/.../NetBeansProjects/TRIOGUI/dist/libNativeAdd.so: undefined symbol: _ZN5Gdsii9GdsParserC1EPKcN7SoftJin10FileHandle8FileTypeEN5boost8functionIFvS2_ESaIvEEE Java Result: 127

Can anybody help me please? :)

like image 683
MohamedMansour Avatar asked Jan 24 '26 11:01

MohamedMansour


1 Answers

I find your symbol highly suspicious. Incorrect mangling. How did you get it? Is it copy&paste from somewhere? Did you try to hack it? 10FileHandleF8ileType should be 10FileHandle8FileType. Then it turns to a valid symbol Gdsii::GdsParser::GdsParser(char const*, SoftJin::FileHandle::FileType, boost::function >)

like image 85
Pavel Zdenek Avatar answered Jan 26 '26 01:01

Pavel Zdenek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!