This is the mail archive of the cygwin@sourceware.cygnus.com 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]

Re: Problem with -mno-cygwin compile


Mumit Khan writes:
 > Craig Lanning <lanning@scra.org> writes:
 > > 
 > > My environment is
 > >    Windows 98
 > >    Cygwin b20.1 + 2/21 snapshot
 > >    gcc 2.95.2
 > > 
 > > If I compile the code below with -mno-cygwin it complains about the
 > > symbol _environ_dll not being resolved.  (I have been seeing this
 > > problem for a couple of months.)  If I compile it without -mno-cygwin
 > > it works fine.  Is there something else I need to do to get it to work
 > > with -mno-cygwin?
 > > 
 > > Craig Lanning
 > > 
 > > --------------------------------------------------
 > > #include <stdio.h>
 > > #include <stdlib.h>
 > > 
 > > extern char **environ;
 >   ^^^^^^^^^^^^^^^^^^^^^^
 > 
 > Sorry, but you can't declare environ like this. Just omit the declaration
 > and you should be fine. The `environ' symbol is a macro and you're
 > essentially overriding it with your own and the linker can't find the
 > real thing. 
 > 
 > Regards,
 > Mumit
 > 

Thanks, that did the trick.

Craig Lanning


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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