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. > I like Pharo, but I am not sure at this point, if that is the easiest or > best option. I am concerned about learning just enough C++ to shoot myself > in the foot. I am also concerned that the C/C++ route will take much more > significant learning than Clojure. > > Going with Clojure does not automatically rule out Pharo. Depending on how > much I like or don't like dealing with Clojure/Java and whether or not I > would want to implement the rest of my application there. I could also > choose to use it to serve the API via http/websockets to a Pharo > application. > > Thanks for your help. > > Jimmie -- Best regards, Igor Stasenko.
