mingw32 DLL getting main args?
Mumit Khan
khan@nanotech.wisc.edu
Tue Nov 30 23:39:00 GMT 1999
"Daniel C. Sinclair" <uf657@victoria.tc.ca> writes:
>
> Why support something that is non-standard? This is supposed to be a
> minimalist Win32 compiler. Just because VC++ has _argc and _argv doesn't
> mean everyone else has to. There are other ways to get the command line
> too. The most standard being just saving argc/argv in global variables
> yourself. There is also GetCommandLine(), CommandLineToArgv(), etc...
One goal of Mingw is source level compatibility with MS compilers, and I
for one see no reason to move away from that.
> Many Win32 functions do the same thing as the C runtime functions. I'm
> using some of those. I have heard that a program and DLL should not use a
> different C runtime DLL - bad things can happen. My DLL will be used by
> many people with different compilers, even different languages. So I don't
> want my DLL importing anything from a C runtime DLL.
I agree on this issue. I've made the change, but need to test it first
before I unleash it. I was hoping to have a new runtime snapshot this week,
but looks like it'll have to wait till the weekend.
The runtime snapshots are in
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/runtime/
The current changes in my tree include (not exhaustive list):
- lots of header additions -- wide character api prototypes, incomplete
but a start; tchar.h additions; fixes to various DLL imported variables;
MSVCRT fixes;
- quite a few w32api changes. Anders Norlander already has some of these
changes, but there are a quite a few that I'm still working on. One
remaining issue is merging in the changes that have been made to Cygwin
development snapshot version, and that's what I need to do now.
- Thread-safe C++ exception handling. This allows the use of pthreads
(POSIX Threads) package. This is still experimental, and subject to
change. You'll need my next release of gcc to take advantage of it
however.
- change in DLL startup code to avoid linking in CRTDLL/MSVCRT. Untested
as of yet.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list