Hi I have what at first seemed to be a very simpe problem:

I have a Microsoft Package that requires me to use nmake to make a lib file. I am unfamiliar with make files as I use visio and XP.

Now I had to move somethings due to restricted write access on
the computer I am currently at

I have a Makefile in:
My documents/Folder/src/

I tried to move the entire visio contents:
/VC/bin/
to the same folder

then calling nmake from a command prompt I get
fatal error RC1015 cannot include file "winver.h"
from when rc is called

Now should I just edit the files to give explicit locations
or is there a better way?

I only need to run this code once so any hack will do?

I think that my problems are just based upon things not being in the
right place.

I gave an explicit include path to the winver.h from where i go the
nmake.

This changed the error to:
U1077 '.\cl.EXE' return code 0x000135

this seems like a very general error and I am not sure what it is doing:
I think this is the makefile line that is failing

$(BIND)\detoured.dll: detoured.cpp detoured.res
	cl /LD $(CFLAGS) /Fe$@ /Fd$(BIND)\detoured.pdb detoured.cpp \
/link $(LINKFLAGS) /base:0xf000000 /incremental:no /subsystem:console \
/entry:DllMain /implib:$(LIBD)\detoured.lib \
/export:Detoured kernel32.lib detoured.res

Does this still mean that a file or dll is not being found

Where can I find a good article about writing makefiles?

I tried to move the entire visio contents:
/VC/bin/
to the same folder

I suppose you mean Visual Studio instead of 'visio', right?

Anyway, consider that upon install, the VS tools do modify the system by modifying environment variables (and being MS tools, maybe system registry etc.) in order to locate things at run-time. So, moving the tools might not be a good idea in the first place.

Then again, Visual Studio comes with a batch file vcvarsall.bat, which configures the environment (via other .bats) so that the binaries find what's needed. So maybe locate this vcvarsall.bat, which is usually in the VS root install dir, and see what you can do in terms of re-configuring the paths and such. It may even work.

I suppose you mean Visual Studio instead of 'visio', right?
Then again, Visual Studio comes with a batch file vcvarsall.bat

Thanks this was enough of a pointer for me to finish solving the problem. I bet there is a cleaner solution but this works:

1: Edit makefile
so that the paths for cl.exe & rc.exe can be found
have to put quotes ("") round as there needs to be spaces

Environment variables would probably work too but I cannot edit them here (My Computer-> Properties->Advanced)

2: Had to edit .rc as #include path was not being found so made it
full path

3: call vsvars32.bat from where makefile is! :)

4: call nmake

steps 3 & 4 need to use "" to work in dos prompt there are lots of misleading error messages to get to this stage

1 this is a capital letter Macro
i.e.

VISIO = "C:/Program Files/Microsoft Visual Studio 8/VC/bin"
#then instead of cl you write $(VISIO)/cl

>> Environment variables would probably work too but I cannot edit them here (My Computer-> Properties->Advanced)

Mmm, what I was sort of saying was that modify the necessary batch files (or copies of the originals actually), which re-configure all these related settings i.e. no need to modify computer-wide settings whatsoever. Well, anyway a good thing that you got it to work.

This question has already been answered. Start a new discussion instead.