On 24.05.2011 10:35, MacArthur, Ian (SELEX GALILEO, UK) wrote:
>
>> One solution would be to link additionally with fltk.lib, so
>> that the same
>> applies as with our FLTK project test programs: they pull
>> WinMain() from
>> the static lib. I don't know whether this is good style,
>> however, since it
>> could come to ambiguities...
>
> I can't vouch for the MS linker, but with the gcc linker, that ought to
> be OK - it will pick the symbols from the DLL first (if we ensure it is
> listed first)

That's the problem: how can we ensure this? We would have to tell the
users who are maybe unfamiliar with all this. And, does it matter at
all, or are the VS tools smart enough to look at the import lib first,
since this represents a dll? And if yes, since which VC++ version?
That's what I meant with ambiguities (among maybe others)...

> and then will only pick any remaining unresolved symbols
> from the static lib; which should only be WinMain() as all the other
> symbols ought to be in the DLL, I think.

I second that ... in an ideal world ;-)

> So... This might well be the easy option...
>
> I have never had problems with the DLL and mingw (Though I do not use it
> all that much now.)
> Have I just been lucky, or is it actually different in this respect?

I *believe* yes. I think that the MinGW runtime doesn't call WinMain()
at program initialization, but calls main() directly, so there shouldn't
be a problem. But I could be wrong with this, I can't tell for sure.

Albrecht
_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to