calling c++ functions using ffi (berkeley dbxml under windows)

Petr petr at madnetwork.org
Sat Oct 28 13:03:49 UTC 2006


Hello,
I am trying to use Berkeley DB XML from withing Squeak. I already found 
out how to call C functions, but I got stuck on "Error : can't find 
function address" when calling a function in a C++ shared library. So I 
first looked up some info on the Squeak wiki and found this: 
http://minnow.cc.gatech.edu/squeak/3735. I used nm from mingw on the 
libdbxml22.lib and got a lot of some information I do not exactly 
understand. An example:

libdbxml22.dll:
00000000 I .idata$4
00000000 I .idata$5
00000000 I .idata$6
00000000 T .text
00000000 T ?abort at XmlTransaction@DbXml@@QAEXXZ
00000000 I _imp_?abort at XmlTransaction@DbXml@@QAEXXZ
          U _IMPORT_DESCRIPTOR_libdbxml22

libdbxml22.dll:
00000000 I .idata$4
00000000 I .idata$5
00000000 I .idata$6
00000000 T .text
00000000 T ?add at XmlResults@DbXml@@QAEXABVXmlValue at 2@@Z
00000000 I _imp_?add at XmlResults@DbXml@@QAEXABVXmlValue at 2@@Z
          U _IMPORT_DESCRIPTOR_libdbxml22

Any pointers to some resources how should I continue are appreciated.

--Petr




More information about the Squeak-dev mailing list