Step 1: Tell the eVC++ 3.0 IDE to create a makefile, which is a text file that contains all the commands the compiler needs to compile the project from the command line. Select menu Project --> Generate Makefile (near the bottom of the program menu). This will generate a file with *.vcn extension.
Step 2. Open the *.vcn file with Notepad. Scroll down a few lines and you will see a line that looks something like this:
!MESSAGE NMAKE /f "example.vcn" CFG="example - Win32 (WCE ARM) Debug"
Copy that line into a batch file. Then look at the *.vcn file and you will see down a few more lines other lines that begin with
!MESSAGE. Choose the configuration you want and replace the text in the batch file you just made with it.
Step 3: you will have to run another batch file that sets up the compiler's environment variables for the target processor. When you installed your compiler it also installed these batch files in the <install directory>/bin directory. On my compiler they are here:
C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN
Now in the batch file you created in Step 2 above you will have to
call one of the batch files in the above bin directory. For example: if you are compiling the ARM target processor then call the file
WCEARM.BAT
Step 4: compile the program from the command line. Just execute the batch file you made above.
Here is the complete batch file that I use:
REM SET UP THE COMPILER'S ENVIORNMENT
CALL C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEARM.BAT
REM COMPILE THE PROGRAM
NMAKE /f "example.vcn" CFG="example - Win32 (WCE ARM) Debug"
Add other projects to the batch file and in the order you want them compiled.