Mail Archives: cygwin/1998/06/23/23:32:00
> vtailor AT gte DOT net
> Sun, 21 Jun 1998 22:57:31 -0500 (CDT)
>
>> Colin Peters (colin AT fu DOT is DOT saga-u DOT ac DOT jp)
>> Fri, 5 Jun 1998 16:55:21 +0900
>>Amsden, Zachary wrote:
>>
>>>Is it possible to link the C runtime library in DLL files? I am trying
>>>to compile some
>>>Microsoft code from the latest platform SDK, specifically the spincube
>>>dll example and test.
>>>I am using the mingw32-gcc distrubution with the latest tools.
>>
>>
>>It is certainly possible to create DLLs that use *a* C runtime library,
>>including crtdll which is the default for Mingw32. I'm fairly sure this is
>>possible even if the calling program doesn't use the same runtime library
>>(though it might be a little more tricky like that in some cases).
>>
>>
>There is a function called `_initterm' in crtdll.dll, and calling
>_initterm without any parameters seems to make a difference when
>you are using the C functions of crtdll.dll without the Dos window
>that goes along with it.
>
>I used my wstdio `pure Windows' console library to generate a MINGW32
>version of the slrn news reader, and the pesky thing has a Dos window
>stuck onto the back of it. Calling _initterm seems to clean up the
>backend Dos window, but it is still there. Do you know of any way
>to start up the slrn program in my window using MINGW32's crtdll.dll
>without the console stuck to the back?
>
Acting on a suggestion from Earnie Boyd, I rediscovered the `FreeConsole'
function, and inserted it right after the declarations in WinMain of my
library. Then I linked to the MINGW32 version of slrn, and, lo, the
Microsoft console window appeared briefly, then disappeared, as my
console window filled the screen to start up slrn. There appear to be
no adverse side effects to using this.
Earnie mentioned someone's ftp site as a place where I could deposit the
library and its include headers. Unfortunately, he didn't include the URL
for this ftp site, nor an estimate of its longevity. If anyone has a site,
and will give me the URL and immeditate permission to upload, I am willing
to send along the MINGW32 `pure windows' slrn program, and separately the
latest libwstdio.a, stdio.h, etc., needed to compile. As I am presently
working on adding copy and paste to the console (paste works), there will
probably be changes and updates in the next month or so.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -