473,786 Members | 2,399 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I: Execute system operation call before compile project?

I am using Microsoft Visual C++ and i have some projects configuration.
(Configuration A, Configuration B, ..., Configuration N)

I need to execute some system operation call such as copy, delete, etc
before each
one project configuration compilation.

How do i do it?

Regards,
Jaime.
Nov 17 '05 #1
9 1749
"Jaime" <Ja***@discussi ons.microsoft.c om> wrote in message
news:A3******** *************** ***********@mic rosoft.com...
I am using Microsoft Visual C++ and i have some projects configuration.
(Configuration A, Configuration B, ..., Configuration N)
OK.
I need to execute some system operation call such as copy, delete, etc
before each one project configuration compilation.

How do i do it?


Your options are described here:

http://msdn.microsoft.com/library/de...ld_process.asp

If I understand you correctly, you want to use the "Pre-Build Event" feature
of the IDE.

Regards,
Will
Nov 17 '05 #2
I am using Visual Studio 6 and the "Pre-Build Event" feature is not present
on the IDE.
"William DePalo [MVP VC++]" wrote:
"Jaime" <Ja***@discussi ons.microsoft.c om> wrote in message
news:A3******** *************** ***********@mic rosoft.com...
I am using Microsoft Visual C++ and i have some projects configuration.
(Configuration A, Configuration B, ..., Configuration N)


OK.
I need to execute some system operation call such as copy, delete, etc
before each one project configuration compilation.

How do i do it?


Your options are described here:

http://msdn.microsoft.com/library/de...ld_process.asp

If I understand you correctly, you want to use the "Pre-Build Event" feature
of the IDE.

Regards,
Will

Nov 17 '05 #3
"Jaime" <Ja***@discussi ons.microsoft.c om> wrote in message
news:45******** *************** ***********@mic rosoft.com...
I am using Visual Studio 6 and the "Pre-Build Event" feature is not present
on the IDE.


In the workspace pane click on the name of your project. Then from the menu
choose Project->Settings. That displays a tabbed-dialog. Find the tab which
is labeled "Pre-Link Step":

http://msdn.microsoft.com/library/de...uild_rules.asp

Regards,
Will
Nov 17 '05 #4
"William DePalo [MVP VC++]" wrote:
"Jaime" <Ja***@discussi ons.microsoft.c om> wrote in message
news:45******** *************** ***********@mic rosoft.com...
I am using Visual Studio 6 and the "Pre-Build Event" feature is not present
on the IDE.


In the workspace pane click on the name of your project. Then from the menu
choose Project->Settings. That displays a tabbed-dialog. Find the tab which
is labeled "Pre-Link Step":

http://msdn.microsoft.com/library/de...uild_rules.asp


OK!!!

But i like to do something tasks such as copy DOS command BEFORE compile
project process. Also, before resource compile process.

"Pre-Link" step is done before the link project process BUT after compile
project process.
"Post-build" step is done after the link project success.

Regards,
Jaime
Nov 17 '05 #5
"Jaime" <Ja***@discussi ons.microsoft.c om> wrote in message news:6474FAED->
OK!!!

But i like to do something tasks such as copy DOS command BEFORE compile
project process. Also, before resource compile process.

"Pre-Link" step is done before the link project process BUT after compile
project process.
"Post-build" step is done after the link project success.


You're out of luck - upgrade to a new version ;-)

Either that, or use an external build-tool to run your builds, invoking
msdev with the appropriate build options to build the project from the
external tool.

-cd
Nov 17 '05 #6
Hi,
I want to write a program under VC++ which able to run an existing DOS file
either open a DOS prompt window and I manually enter commands, or program
itself retrieve the DOS file and run it. Just I need to know it is possible
under VC++ and how?

Thanks in advance.

ASH
May 2 '06 #7
"Ash Homain" <ho****@hotmail .com> wrote in message
news:B9******** *************** ***********@mic rosoft.com...
I want to write a program under VC++ which able to run an existing DOS
file
either open a DOS prompt window and I manually enter commands, or program
itself retrieve the DOS file and run it. Just I need to know it is
possible
under VC++ and how?


What you do is start a process which runs a command interpreter. On
NT/2K/XP/2K+3, the default command shell is "cmd.exe". Otherwise it is
"command.co m". I mention that only because you used "DOS" several times in
your question.

In any event, once you know the command interpreter you want to run, you
start it in any number of ways - _spawn..., _exec..., ShellExecute(),
CreateProcess() , WinExec() etc

Regards,
Will
May 2 '06 #8
Thanks for your comments. Actually, I wrote a program in VC++ that produces a
number of data. I need to process those data in a program, which is run under
DOS environmental. Then I need to return outputs in my program and continue
for post processing. When data are more than a thousand it will be very
tedious job. I am thinking probably it is possible to make a link between my
program and DOS-Based program to speed up it. If you have any comment please
share with me.
Regards

ASH

--
Ash Homain
"William DePalo [MVP VC++]" wrote:
"Ash Homain" <ho****@hotmail .com> wrote in message
news:B9******** *************** ***********@mic rosoft.com...
I want to write a program under VC++ which able to run an existing DOS
file
either open a DOS prompt window and I manually enter commands, or program
itself retrieve the DOS file and run it. Just I need to know it is
possible
under VC++ and how?


What you do is start a process which runs a command interpreter. On
NT/2K/XP/2K+3, the default command shell is "cmd.exe". Otherwise it is
"command.co m". I mention that only because you used "DOS" several times in
your question.

In any event, once you know the command interpreter you want to run, you
start it in any number of ways - _spawn..., _exec..., ShellExecute(),
CreateProcess() , WinExec() etc

Regards,
Will

May 3 '06 #9
"Ash Homain" <ho****@hotmail .com> wrote in message
news:C7******** *************** ***********@mic rosoft.com...
Thanks for your comments.
You are welcome.
Actually, I wrote a program in VC++ that produces a
number of data. I need to process those data in a
program, which is run under DOS environmental. Then
I need to return outputs in my program and continue
for post processing. When data are more than a thousand
it will be very tedious job. I am thinking probably it is possible
to make a link between my program and DOS-Based program
to speed up it.
Read the article "HOWTO: Spawn Console Processes with Redirected Standard
Handles" here

http://support.microsoft.com/?id=190351
If you have any comment please
share with me.


People use the method that the article describes all the time. I'm not a big
fan of it. It is a brittle hack. I'd search for a better solution.

Regards,
Will
May 3 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5055
by: Tim Williams | last post by:
I'm trying to write a simple python program to access a MySQL database. I'm having a problem with using MySQLdb to get the results of a SQL command in a cursor. Sometimes the cursor.execute works, sometimes not. From mysql: mysql> show databases; +-----------+ | Database |
0
550
by: zhouhaiming | last post by:
On our test machine I can compile my c source code on AIX5.1(ML4) by "- q32" option and "OBJECT_MODE=32" environment variable, and it can correctly running. My operation system environment is: AIX5.1, ML4, 32 bit Kernel, IBM c5.1 compile and Informix7.31. I can't compile my c source code on the same system by using "-q64" option and "OBJECT_MODE=32"environment, the c compiler raised the error: /usr/informix/lib/esql/libifsql.so can't be...
11
3763
by: Andreas Wirén | last post by:
Hi I'm a C# .NET newbie doing a minor school project but I'm getting a strange error message. 'System.NullReferenceException' occurred in system.windows.forms.dll Additional information: Object reference not set to an instance of an object." As my references look I seem to be using the old framework(1.0.3705) for this, but re-referencing to the newer framework(1.1.4322) dll's produces the same error. This happens under all...
2
3335
by: Eli | last post by:
Hi all We currently have a strange problem with calling a Stored Procedure (SQL Database) in our C# Project. The only error I get is "System error" which says a lot :) Background: We have several stored procedures to Insert and update datas in our SQL database. Some stored procedures are smaller (insert datas in only one table) and some of them are quite big (insert datas in several
4
7882
by: Chris | last post by:
I posted this in the C# language group, then thought it might be more appropriate in this group. I would not cross-post except I want the answer so badly. I built small C# Web and Web Service applications in a training class last week. The applications worked in the class, but when I tried to run them again over the weekend, they both bombed. Instead of getting my Web page, or the Web Service page, I get a page full of error text...
0
1225
by: Karl Bauer | last post by:
Hello! I have a strange problem: The aspx File for articles is saved in the root Folder of my asp.net application -> artikel.aspx It's like a template and in this page I use a Server.Execute to another file called fotogallery.aspx which is saved in the subfolder contentBlocks. This two pages are hosted in different projects, so I get two
0
4283
by: Simone Chiaretta | last post by:
I'm having a problem with webservices: from times to times I get the following error (incapsulated in a SOAP Exception) It seems like each time I call a webservice, something is auto-generated and then compiled. I saw a KB article about a problem with asmx called from aspx: a problem caused by IIS lockdown restricting too many access. But we never used it... Also we verified that the account that the webservice is running with (the...
3
5006
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : >************************************************************************ > <WebMethod(), System.Web.Services.Protocols.SoapRpcMethod()> _ > Public Function HelloWorld() As > <System.Xml.Serialization.SoapElementAttribute("return")> String
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10108
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9960
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.