I have application build in Embeded VC++ 4.0 project,now i want to include (.h) file in project which is produced from another (.exe) built in Win32(App) Console.I have added header file in project workspace.The problem is (.h) file is created after compiling the project.I want to include (.h) file before compilation of code because it is being used in project.Is there any way to do thing?
I have tried by writing command in Custom build step:
call "L:\11rvtsapril\ExcelCvt.exe"//(ExcelCvt.exe is Wn32 Console App)
Is there any way to change Comipler option so that Cosole App(.exe) runs first,after that compilation of Application take place.Thanks in advance.


priyank

Recommended Answers

All 6 Replies

I take it that the console app is program that runs on a PC and compiled with a different compiler -- you can't compile PC programs with eVC++ 4.0. Or do both programs run on the same target device?

I know that VC++ 2005 is capable of doing what you want -- that is setting dependencies among projects. Not sure about eVC++ 4.0, I doubt it. What you might have to do (and how I did it in the past) was to write a small batch file to compile the programs in the desired order from the command-line.

I take it that the console app is program that runs on a PC and compiled with a different compiler -- you can't compile PC programs with eVC++ 4.0. Or do both programs run on the same target device?

I know that VC++ 2005 is capable of doing what you want -- that is setting dependencies among projects. Not sure about eVC++ 4.0, I doubt it. What you might have to do (and how I did it in the past) was to write a small batch file to compile the programs in the desired order from the command-line.

I could write a small batch file but problem is suppose i run an (.exe)(Win32 Console App) in batch file that fine.But how culd I compile EVC++ Application from a batch file.Is there is any way to do so????

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.

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.

First of all thanks for the help.I have followed the step
u have told me but i am getting some error.
The errors are:
Variable CESubsytem is not specified.
Variable CEVersion is not specified.
NMAKE Fatal error: 1073 don't know how to make

i have written following commands:
NMAKE /f "L:\11rvtsapril\SBC.VCN" CFG="SBC - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Application")
& i have already run batch file WCEx86.BAT file for environment variable setting.
But i can't figure out what the error is.Is there is some error regarding target directory ?

Here is more information. I think I left out something in my instructions. Scroll down to the Examples section.

Here is more information. I think I left out something in my instructions. Scroll down to the Examples section.

Thanks a lot for your help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.