Including header file in project??

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Dec 2006
Posts: 18
Reputation: pri_skit is an unknown quantity at this point 
Solved Threads: 1
pri_skit pri_skit is offline Offline
Newbie Poster

Including header file in project??

 
0
  #1
May 2nd, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,365
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1464
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Including header file in project??

 
0
  #2
May 2nd, 2007
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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 18
Reputation: pri_skit is an unknown quantity at this point 
Solved Threads: 1
pri_skit pri_skit is offline Offline
Newbie Poster

Re: Including header file in project??

 
0
  #3
May 3rd, 2007
Originally Posted by Ancient Dragon View Post
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????
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,365
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1464
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Including header file in project??

 
0
  #4
May 3rd, 2007
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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 18
Reputation: pri_skit is an unknown quantity at this point 
Solved Threads: 1
pri_skit pri_skit is offline Offline
Newbie Poster

Re: Including header file in project??

 
0
  #5
May 4th, 2007
Originally Posted by Ancient Dragon View Post
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 ?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,365
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1464
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Including header file in project??

 
0
  #6
May 4th, 2007
Here is more information. I think I left out something in my instructions. Scroll down to the Examples section.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 18
Reputation: pri_skit is an unknown quantity at this point 
Solved Threads: 1
pri_skit pri_skit is offline Offline
Newbie Poster

Re: Including header file in project??

 
0
  #7
May 4th, 2007
Originally Posted by Ancient Dragon View Post
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.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC