assuming gcc is the mingw cc on $PATH ...
the preprocessor is run-time configurable
usually from probe information in the file named by
probe -k C pp gcc
listed by
probe -l C pp gcc
if you call cpp standalone (outside of the uwin cc wrapper)
then you must tell it what cc it should mimic with this option
-D-Xgcc
otherwise it will mimic the default cc
if the probe info for gcc does not exist then it should
be automatically generated -- this stderr message is printed
before the automatic (re)probe
probing C language processor <path-of-cc> for pp information
for gcc you should see this pragma in the probe -l output
#pragma pp:headerexpand
with this pragma your example should work
before generating the probe info you can try this to verify
cpp -D:headerexpand ...
On Thu, 05 Nov 2009 16:33:15 -0600 [email protected] wrote:
This is my first time using UWIN.
I installed
uwin-base.2009-11-02.win32.i386.exe
and
uwin-dev.2009-11-02.win32.i386.exe
into directory C:\Program Files\UWIN
and have installed MinGW into directory C:\MinGW
I seem to of found a problem with your preprocessor
#define JACOB .
#define HI(name) <JACOB/std##name>
#warning HI(io.h)
#include HI(io.h)
should properly #include the <./stdio.h> header,
cpp -D-Xgcc main.c
works
however
cc -c main.c
still does not work
I ended up noticing...
$ cc -c -V main.c
/usr/lib/cpp -I-Tastwin32.h -D_STD_INCLUDE_DIR=... -I/usr/include
-I/C/MinGW/include -D_DLL -D-Xcc -D:nocatliteral main.c main.i
cpp: "main.c", line 3: warning: <./stdio.h>
cpp: "main.c", line 4: JACOB/stdio.h: cannot find include file
-D-Xcc doesn't look right...
how do I force cc to use the parameter -D-Xgcc?
here are some of the steps I followed...
[PACKAGE_cc=C:\MinGW]
$ echo $PATH
/usr/bin:C:\MinGW/bin:/sys:/win:.
$ probe -l C pp gcc
probe: gcc: processor not found
so I changed to
[PACKAGE_cc=/C/MinGW]
$ echo $PATH
/usr/bin:/C/MinGW/bin:/sys:/win:.
$ probe -l C pp gcc
probe: /usr/lib/probe/C/pp/8BB9C96Abingcc: cannot read [No such file or
directory]
#pragma pp:headerexpand
is in
0F689CA5rbincc
54B606D8binncc
96A10165rbinCC
57A06D78binNCC
A3C00F58rbincc
not in
46A1D8F8rbincc
thats all I have in /usr/lib/probe/C/pp/ that looks like 8BB9C.
$ cc -c main.c
cpp: "main.c", line 3: warning: <./stdio.h>
cpp: "main.c", line 4: JACOB/stdio.h: cannot find include file
$ cpp -D-Xgcc main.c
[... works perfect ...]
$ probe -l C pp gcc
[... now it works??? even lists pp:headerexpand ...]
I think I remember seeing "probing C language processor <path-of-cc> for pp
information" at some point.
$ probe -k C pp gcc
/usr/lib/probe/C/pp/8BB9C96Abingcc
and 8BB9C96... now exists.
However,
$ cc -c main.c
cpp: "main.c", line 3: warning: <./stdio.h>
cpp: "main.c", line 4: JACOB/stdio.h: cannot find include file
still doesn't work.
$ cc -c -V main.c
/usr/lib/cpp -I-Tastwin32.h -D_STD_INCLUDE_DIR=... -I/usr/include
-I/C/MinGW/include -D_DLL -D-Xcc -D:nocatliteral main.c main.i
cpp: "main.c", line 3: warning: <./stdio.h>
cpp: "main.c", line 4: JACOB/stdio.h: cannot find include file
-D-Xcc doesn't look right...
_______________________________________________
uwin-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/uwin-users