Hi there, I'm working in a telerobotics project and I need to link a windows dll in order to use a Cybernet Joystick. First I tried to use the winAPI functions LoadLibrary,FreeLibrary and GetProccessAddress as I were working on Windows, and I recompiled my program with winelib: *. winemaker /my_path/ *. ./configure *. make all but it didn't create any executable, what I obtained was a lib*.so, because winemaker thought I was trying to compile a dll, not to use one. After that I tried to compile my program without winemaker, and I obtained a HEAP_PTR error when executing what I copiled. And If I tried to link the lib*.so and load the main symbol I obtained the same error. So my question is quite siple How can I link a native dll in a Unix project? I've read somewhere that I have to use a parser, Is there anybody who can give me some code?
Thanks for your precious time.
_________________________________________________________________ Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp
On Wed, 25 Jul 2001, José Soriano Díaz wrote:
Hi there, I'm working in a telerobotics project and I need to link a
windows dll in order to use a Cybernet Joystick. First I tried to use the winAPI functions LoadLibrary, FreeLibrary and GetProccessAddress as I were working on Windows, and I recompiled my program with winelib: *. winemaker /my_path/ *. ./configure *. make all but it didn't create any executable, what I obtained was a lib*.so, because winemaker thought I was trying to compile a dll, not to use one.
To force winemaker to generate an executable simply use it as follows: * type "winemaker --cuiexe /my_path" to indicate a console executable * type "winemaker --guiexe /my_path" to indicate a graphical executable
You can also use "winemaker -?" to get a list of options supported by winemaker.
So my question is quite siple How can I link a native dll in
a Unix project?
I think you have used the right approach: LoadLibrary / GetProccessAddress / FreeLibrary. If that works for you then it's the simplest approach.
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ The greatest programming project of all took six days; on the seventh day the programmer rested. We've been trying to debug the *&^%$#@ thing ever since. Moral: design before you implement.