Many, many moons ago (Last summer?) I wrote the documentation to do this for the
single (dll|.a) linkage setup we had then.
<HACK ALERT>
In summary it had a new .so and winestub file that used a globally declared C++ object
(in the .so) to call the MAIN_WineLib_Init(sp?) function in its constructor.
We then made sure to link the .so file as the last object on the gcc command line
because the global objects are constructed first for that .so.
</HACK ALERT>
This worked. We were not proud of it but we couldn't find an alternative that would
happen before the globally declared objects in the main program (and its statically
linked libraries e.g. MFC)
would start calling WIN32 functions in their constructors.
Has a better solution for this problem been found?
I can dredge up the patch again from an old CVS repository if it is still wanted but I
suspect it is way out of date...
Albert.
Andreas Mohr wrote:
>
> On Tue, May 30, 2000 at 08:39:24AM -0700, Damyan Ognyanoff wrote:
>
> [...]
> > I sugest you to write your app as a .so lib and to
> > write a small loader. which can perform additional
> > LoadLibrary'c in it's WinMain routine to load MFC and
> > your app.
> >
> > I follow this techique and manage to run a program
> > that use a MFC.
> Cool, fine, good, [whatever].
>
> Could you please begin to write some sort of Winelib HOWTO to be added
> to the Wine documentation/ dir ?
> Or somebody else maybe...
>
> We definitely need this now that Winelib is starting to become
> A Useful Thing (tm).
>
> Andreas Mohr
--
Albert den Haan, Lead Developer @ Linux Port Team . Corel Corporation
[EMAIL PROTECTED] x 5318
--
The address in the headers is not the poster's real email address. Do not send
private mail to the poster using your mailer's "reply" feature. CC's of mail
to mailing lists are OK. Problem reports to "[EMAIL PROTECTED]".
The poster's email address is "[EMAIL PROTECTED]".