Re: Lin32Lib?
- Posted by jbrown105 at HotPOP.com Apr 23, 2001
- 471 views
I'm not very good at C++ programming, so I'm not sure if I can do that, although I'll probally try. Anyone else will to give it a go as well? On Mon, Apr 23, 2001 at 08:39:52AM -0700, Matthew Lewis wrote: > > > > > > -----Original Message----- > > From: Irv Mullins [mailto:irvm at ellijay.com] > > > Most of the good packages, like QT, are written in C++, which > > makes interfacing > > with them very difficult. > > Actually, I don't think that it would be as difficult as you might think > (not that it'll be simple). Working with COM has given me a new insight on > interfacing with C++, since that's effectively what happens with COM. Also, > in working with COM, I think I might have solved some other problems that > might get in your way. > > Here's what I think you'll need to do: > - Get a hold of the constructor for an object. It should return a pointer > to the object. > - Wrap the member functions just like you would with C. > - Pass the pointer to the object as the first argument in any function call > (C++ does this implicitly). > > I suspect that the functions will have to be loaded by ordinal (C++ name > decoration isn't much to look at), so you'll probably need to get your hands > on a lib file or some other kind of documentation on the lib. This could be > the most difficult part, except that I guess since this is linux, you ought > to be able to get a look at the full source, right? > > And then you'll probably need to load the .so's manually (since > open_dll/define_c_func don't seem to work by ordinal). So you'll probably > have to call them by pointer (no problem, since fptr.e in EuCOM should work > in linux :). > > Matt Lewis > > > -- Linux User:190064 Linux Machine:84163 http://jbrown105.1avenue.com