944,141 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 3611
  • C++ RSS
May 2nd, 2007
0

Including header file in project??

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
pri_skit is offline Offline
19 posts
since Dec 2006
May 2nd, 2007
0

Re: Including header file in project??

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.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005
May 3rd, 2007
0

Re: Including header file in project??

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????
Reputation Points: 10
Solved Threads: 1
Newbie Poster
pri_skit is offline Offline
19 posts
since Dec 2006
May 3rd, 2007
0

Re: Including header file in project??

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:
  1. REM SET UP THE COMPILER'S ENVIORNMENT
  2. CALL C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEARM.BAT
  3. REM COMPILE THE PROGRAM
  4. NMAKE /f "example.vcn" CFG="example - Win32 (WCE ARM) Debug"
  5.  

Add other projects to the batch file and in the order you want them compiled.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005
May 4th, 2007
0

Re: Including header file in project??

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:
  1. REM SET UP THE COMPILER'S ENVIORNMENT
  2. CALL C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEARM.BAT
  3. REM COMPILE THE PROGRAM
  4. NMAKE /f "example.vcn" CFG="example - Win32 (WCE ARM) Debug"
  5.  

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 ?
Reputation Points: 10
Solved Threads: 1
Newbie Poster
pri_skit is offline Offline
19 posts
since Dec 2006
May 4th, 2007
0

Re: Including header file in project??

Here is more information. I think I left out something in my instructions. Scroll down to the Examples section.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005
May 4th, 2007
0

Re: Including header file in project??

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.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
pri_skit is offline Offline
19 posts
since Dec 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: how to download wxWidgets
Next Thread in C++ Forum Timeline: C++ in wxWidgets





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC