I want to compile my c++ codes with cl compiler. Therefore I started a "c++ makefile project" in eclipse. Then I wrote my make file. I must run vcvars32.bat firstly to run cl so I write that command in make file also bu it didn't work correctly. What should I do now? How can I run that command before building the code? By the way I am using nmake.
My make file is below:
OBJS = helloWorld.o
TARGET = helloWorld.exe
all: $(TARGET)
helloWorld.exe:
**vcvars32.bat**
cl helloWorld.cpp
rm -f *.obj
clean:
rm -f helloWorld.exe *.obj
Open a command line, run vcvars32.bat, then start eclipse from the same command line.
The first two steps can be combined into one by going to Start->Visual Studio xxx->Visual Studio Tools->VS command prompt
(exact naming depends on what you have installed)