ID Number: Q66649
1.10 | 1.10
MS-DOS | OS/2
Summary:
The U4004 error message is generated by NMAKE when it encounters
multiple build dependency blocks for a single target. The following is
a sample makefile:
all: tty.exe
tty.res: tty.rc tty.dlg tty.h
rc -r tty.rc
tty.obj: tty.c
cl -c -AS -Gsw -Os -Zdp tty.c
wstdio.obj: wstdio.c
cl -c -AS -Gsw -Os -Zdp wstdio.c
tty.exe: tty.obj wstdio.obj tty.def
link /NOD tty wstdio,,,libw slibcew,tty.def
rc tty.res
tty.exe: tty.res tty.dlg tty.h
rc tty.res
To eliminate the error, use the multiple dependency block separator --
a pair of colons (::). In the above makefile, the two dependency
blocks for tty.exe should use this syntax. The multiple dependency
block separator is documented further on page 109 of the "Advanced
Programming Techniques" manual, as well as in the online help.
The following is the corrected makefile:
all: tty.exe
tty.res: tty.rc tty.dlg tty.h
rc -r tty.rc
tty.obj: tty.c
cl -c -AS -Gsw -Os -Zdp tty.c
wstdio.obj: wstdio.c
cl -c -AS -Gsw -Os -Zdp wstdio.c
# Note the use of the double colon below and in the next block...
tty.exe:: tty.obj wstdio.obj tty.def
link /NOD tty wstdio,,,libw slibcew,tty.def
rc tty.res
tty.exe:: tty.res tty.dlg tty.h
rc tty.res