This is the mail archive of the cygwin@cygwin.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]
Other format: [Raw text]

Re: Problems compiling trivial C program.


On Fri, Feb 07, 2003 at 01:33:40PM -0000, Christopher January wrote:
> I'm having trouble compiling this test program:
> 
> void f(){}
> 
> using the command line:
> gcc test.c -c -o test.o
> 
> using 1.3.19 or latest Cygwin snapshot (2003-Feb-07) (same error with
> both) and gcc-3.2-3.
> 
> The error I see is:
> 
> 16 bit MS-DOS Subsystem
> /usr/src/cygwin-cvs/obj
> The NTVDM CPU has encountered an illegal instruction.
> CS:0000 IP:0077 OP:f0 37 05 0e 02 Choose 'Close' to terminate the
> application.
> Close | Ignore


I've seen these errors myself in the past, all associated with
running configure and/or gcc.  For some reason, NT is trying to
invoke the NT Virtual DOS Machine (NTVDM) when it runs gcc.exe.
The problem is that gcc.exe should be identified as a Win32 console
application, and therefore doesn't need NTVDM to run.

I wonder if there's some sort of memory corruption going on that
results in gcc.exe being identified as a 16-bit mode DOS program,
like maybe the NE stub in the PE file being scribbled by an errant
pointer.  Maybe something in the NE stub in the actual disk file
for gcc.exe has some bits that inadvertently set of NTVDM.

Anyway, you can try the following hack that might allow you to run
the compiler (that is, as long as you don't try to run any DOS apps
under NT):

    http://www.rtems.com/rtems/maillistArchives/rtems-users/2001/june/msg00182.html

There's additional information in this MSDN KnowledgeBase article:

    http://support.microsoft.com/default.aspx?scid=KB;en-us;q196453

-- 
Dario Alcocer -- Sr. Software Developer, Helix Digital Inc.
alcocer@helixdigital.com -- http://www.helixdigital.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]