• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

execute command after build

In Visual C++ 4.2, is there any way to automatically execute a command (exe) after a successful build?
0
faster
Asked:
faster
  • 4
  • 2
  • 2
  • +1
1 Solution
 
chensuCommented:
I don't have the version 4.2. Since you are asking this question, it seems different from the version 5.0. But you should be able to do it by editting the .mak directly.
0
 
fasterAuthor Commented:
Is there ant way provided by the IDE itself?  I don't like modify the make file manually,
0
 
alexoCommented:
Create a new project in your workspace.  Make it a "makefile".  Make it a default project.  Chose any command you wish as the build procedure.  Make your original project a subproject of the new one.

Now, whenever you build the new project, the subproject will be buit first.

0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
fasterAuthor Commented:
Sorry, I want a seamless solution by the IDE, if the IDE itself can't do this cleanly, I'd rather not have it.

So it seems that there is no such feature in VC.
0
 
alexoCommented:
If you want the IDE of 4.2 to automatically and transparently execute a command after any successful build then no, you cannot do it.

You do however have several workarounds:
1. chensu's suggestion of editing the .MAK files.
2. My suggestion of using subprojects.
3. Create a "tool" that will invoke the makefile and your command.

0
 
NorbertCommented:
There is a simple solution - I have tested it and it works:
Menu Build -> Settings  
custom build
 Build commands:
       $(TargetPath)
Output File
       NULL
my application runs now automatically after build
Hope that helps
   Norbert


0
 
fasterAuthor Commented:
Thanks Norbert.  How come I did not the "custom build" tab.
0
 
chensuCommented:
So, that is the same as Visual C++ 5.0.
0
 
fasterAuthor Commented:
Sorry that I confused you, chensu.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now