Mixed mode for shared libraries (Full Version)

All Forums >> [SFU / Interix / SUA Technology] >> Windows Server 2003 R2 SUA



Message


james_bray -> Mixed mode for shared libraries (Oct. 4, '06, 10:15:31 AM)

Hi,

Can anyone tell me if it is possible to create a mixed mode shared object, i.e. using gcc -shared -R.

I am attempting to invoke a function in a Win32 DLL (of my own) from an Interix mixed mode library (.so), and having no luck. Invoking Win32 functions from a mixed mode executable built using GCC seems to work fine.

Both the library and the associated application are built as Interix mixed mode.

Although both build fine, when running the application I get the following error:

vol_ed: error in loading shared libaries
libIDB500.so: undefined symbol: _w32_system

(vol_ed is the name of the app, libIDB500.so is the name of library and _w32_system is the function in the DLL it is trying to call.

Any help would be appreciated :-)

James Bray
Badley Geoscience Limited




james_bray -> RE: Mixed mode for shared libraries (Oct. 4, '06, 12:21:08 PM)

I have found one workaround.

Instead of attempting to invoke the Win32 DLL directly from the .so, I have the .so call a function in a separate static library that is then linked into the application.

This works and the Win32 DLL is called correctly.

Not exactly optimal, but a pretty decent workaround.

I would still be interested if anyone knows if Interix mixed-mode shared objects can directly call Win32 DLLs though....

Cheers,

James Bray
Badley Geoscience Limited




Page: [1]



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.031