On 11/9/2012 7:22 PM, Igor Stasenko wrote:
On 9 November 2012 12:19, Jimmie Houchin <[email protected]> wrote:
The COM API is deprecated and no longer supported. Only the C++ API is what
is available for use from Pharo.


On 11/8/2012 11:31 PM, Igor Stasenko wrote:

On 8 November 2012 23:25, Jimmie Houchin <[email protected]> wrote:

On a second look at the API's documentation, the DLL is C++ not C. I don't
know, but that might have been evident by the requirement of implementing
interfaces.

well, with C++ it is a bit worse than C: because C++ compilers use
name mangling for the function names.
Means that, if you will look for exported function 'abc()', you will
probably find it under different name, like
abc@nby_xrt


How does one go about discovering these names?

This is best what i found, read to end:

https://www.ruby-forum.com/topic/173158
apart from that, once you figure the exact correct name, you can go
and call that function.

Things is a bit different if the exported function is a member of class.

So, what i can say.. you can try and see if it rolls (or rocks).. and
if it not, then the best option would be to implement own wrapper
library (but this time in C). And then use that library from pharo.


Ok, then this is the tricky part because I have a lot of C++ classes which
are interfaces to be implemented and instances of those classes to be passed
into other instances of other classes in the DLL.

An example from the documentation.
'''
An instance of the class implementing IO2GSessionStatus interface must be
subscribed to the session object before calling IO2GSession::login method.
It is accomplished by calling IO2GSession::subscribeSessionStatus method.
For example, ...
'''

As it stands my options are to learn Clojure (which I am already in progress
of doing) in order to access the API via Java. Or to learn C/C++ and NB to
access the API from Pharo.

googling didn't gave me any examples how Clojure deals with C++...
have a link?
i suspect it is like others, generating wrapper C code to call C++ code.

Clojure does not access the C++ code. It would access the Java library in its .jar file. It has native access. The API is offered in three forms, Java, .NET and C++.



Jimmie

Reply via email to