This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: experimental package: gcc4-4.3.2-2


Den 2009-03-12 18:01 skrev Dave Korn:
Dave Korn wrote:

Why is a -D for _DLL present? That is a reserved definition in the
implementation's namespace,

Hmmm, I may have misunderstood that. Does -D_DLL mean something special to MSVC, does anyone know?

When you compile with shared libc on MSVC (e.g. -MD), it defines _DLL for you.


$ cat << EOF > dll.c
#ifdef _DLL
choke me
#endif
int foo;
EOF
$ cl -MD -c dll.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

dll.c
dll.c(2) : error C2061: syntax error : identifier 'me'
dll.c(2) : error C2059: syntax error : ';'
$ cl -c dll.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

dll.c
$

Cheers,
Peter

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]