Problem compiling non cygwin programs using Cygwin V1.0

Larry Wagner wagner@weru.ksu.edu
Thu Mar 9 08:39:00 GMT 2000


I have the following problem related to compilation of programs with
the -mno-cygwin option using the Cygwin V1.0 (I don't remember seeing
this problem with the B20.1 version):

When I compile a program for the cygwin environment, everything works
as expected.

When I compile a program using the -mno-cygwin option, I get link errors.

After tracing down the situation, reading Mumit Khan's mno-cygwin-howto
memo, and installing the gcc version 95.2 compiler and associated mingw
libraries for it, I tried again with the same result.

Reviewing Mumit Khan's memo and attempting to duplicate the examples
shown in the memo revealed that the "no-cygwin" option is NOT looking
for the mingw32 include files as demonstrated in the memo.  Those include
files are in the expected locations.  It made no difference whether I
used the gcc compiler that was provided with the Cygwin package or the
newer 95.2 version.

So, is the "no-cygwin" compiler option supposed to change the default
include file lookup directories as implied in Mumit Khan's memo?
If so, why doesn't it work for me?  If not, am I relegated to explicitly
setting the necessary include directory search paths when compiling
with the "no-cygwin" option enabled?


LEW

Here are the particulars that shows the problem of not finding the correct
include files when the "no-cygwin" option is specified (even though it doesn't
affect the "Hello World!" program in this case):

10:wagner@CHEPIL-NT:~/testing> gcc -v
Reading specs from /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/specs
gcc version 2.9-cygwin-990830
11:wagner@CHEPIL-NT:~/testing> gcc -c -H hello.c
/usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/s
tdio.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/
_ansi.h
  /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include
/sys/config.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stddef.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stdarg.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/
sys/reent.h
  /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include
/time.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/includ
e/machine/time.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stddef.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/includ
e/machine/types.h
12:wagner@CHEPIL-NT:~/testing> gcc -mno-cygwin -c -H hello.c
/usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/s
tdio.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/
_ansi.h
  /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include
/sys/config.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stddef.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stdarg.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/
sys/reent.h
  /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include
/time.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/includ
e/machine/time.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stddef.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/includ
e/machine/types.h
13:wagner@CHEPIL-NT:~/testing>


10:wagner@CHEPIL-NT:~/testing> gcc -v
Reading specs from /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/specs
gcc version 2.9-cygwin-990830
11:wagner@CHEPIL-NT:~/testing> gcc -c -H hello.c
/usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/s
tdio.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/
_ansi.h
  /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include
/sys/config.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stddef.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stdarg.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/
sys/reent.h
  /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include
/time.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/includ
e/machine/time.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stddef.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/includ
e/machine/types.h
12:wagner@CHEPIL-NT:~/testing> gcc -mno-cygwin -c -H hello.c
/usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/s
tdio.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/
_ansi.h
  /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include
/sys/config.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stddef.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stdarg.h
 /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include/
sys/reent.h
  /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/include
/time.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/includ
e/machine/time.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/include/stddef.h
   /usr/lib/gcc-lib/i686-cygwin/2.9-cygwin-990830/../../../../i686-cygwin/includ
e/machine/types.h
13:wagner@CHEPIL-NT:~/testing>



Larry Wagner, Agricultural Engineer | E-mail: wagner@weru.ksu.edu
USDA-ARS Wind Erosion Research Unit | phone:  (785) 532-6807
Throckmorton Hall, KSU              | fax:    (785) 532-6528
Manhattan, KS 66506                 | URL:    http://www.weru.ksu.edu


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



More information about the Cygwin mailing list