473,396 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Build an exe from another exe

Hi everyone, I need to make another exe from my app.
For example there are some app that compare two file and then buil
another exe with the different (patcher).
Help me please! :)

10x

Jan 2 '07 #1
5 1216

<Ga********@gmail.comwrote in message
news:11*********************@42g2000cwt.googlegrou ps.com...
Hi everyone, I need to make another exe from my app.
For example there are some app that compare two file and then buil
another exe with the different (patcher).
Help me please! :)
There are no facilites in C++ to directly do what
you're asking. How an executable is formed is
dependent upon the host system. However, once
you figure that out, you can use C++ to open an
output file (std::ofstream) and write any bits
to it you want. (You'll want to open the file in
'binary mode').

For further details about how to do what you want,
try consulting support resources concerning your
particular system(s).

-Mike
Jan 2 '07 #2

Mike Wahler wrote:
There are no facilites in C++ to directly do what
you're asking. How an executable is formed is
dependent upon the host system. However, once
you figure that out, you can use C++ to open an
output file (std::ofstream) and write any bits
to it you want. (You'll want to open the file in
'binary mode').

I can think of several platforms where you *cannot* write an executable
file without non-standard extensions. Several mainframe platforms, for
example, implement executables as structured file types (not byte
streams), and need to be written as such (and not as a simple binary
byte stream).

Jan 2 '07 #3
On 2 Jan 2007 13:55:08 -0800, "ro***********@yahoo.com"
<ro***********@yahoo.comwrote:
>
Mike Wahler wrote:
>There are no facilites in C++ to directly do what
you're asking. How an executable is formed is
dependent upon the host system. However, once
you figure that out, you can use C++ to open an
output file (std::ofstream) and write any bits
to it you want. (You'll want to open the file in
'binary mode').


I can think of several platforms where you *cannot* write an executable
file without non-standard extensions. Several mainframe platforms, for
example, implement executables as structured file types (not byte
streams), and need to be written as such (and not as a simple binary
byte stream).
An alternative would be not to write the executable binary directly,
but to generate a file of source code and call a compiler to compile
that source code into the executable in whatever format would be
required.

rossum
Jan 3 '07 #4

rossum wrote:
On 2 Jan 2007 13:55:08 -0800, "ro***********@yahoo.com"
<ro***********@yahoo.comwrote:

Mike Wahler wrote:
There are no facilites in C++ to directly do what
you're asking. How an executable is formed is
dependent upon the host system. However, once
you figure that out, you can use C++ to open an
output file (std::ofstream) and write any bits
to it you want. (You'll want to open the file in
'binary mode').

I can think of several platforms where you *cannot* write an executable
file without non-standard extensions. Several mainframe platforms, for
example, implement executables as structured file types (not byte
streams), and need to be written as such (and not as a simple binary
byte stream).
An alternative would be not to write the executable binary directly,
but to generate a file of source code and call a compiler to compile
that source code into the executable in whatever format would be
required.

Sure, there's a lot to recommend that approach, not least is
eliminating the tedium of actually generating object code and
executables directly. Of course it requires a great deal of
infrastructure to be installed and available on your system (very few
Windows systems have an installed C compiler, for example), and how you
get that to happen will be very system specific.

Jan 3 '07 #5
Perfect, Thx.
So, I can embed a minimal installation of MinGW (for example) or for
who have alredy mingw a version that ready system variables(for
Windows) or use shell (*nix).
Yes I think this is perfect... just for curiosity there are another
way?

thanks to all :)

Jan 3 '07 #6

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

Similar topics

3
by: Jerry Boone | last post by:
I have a development unit running XP Pro and I cannot get it to build a web project without restarting IIS. There errors in the task list are.... ! Could not copy temporary files to the output...
5
by: Al | last post by:
Hi all We have created a xml file that imports a single project using the Import element. This project compiles to a class library, but has references to two other projects that are also class...
1
by: Matt Fielder | last post by:
I need to customize the build process beyond just selecting which projects get built in what order. What I want to happen is when I select "Release" 1: Pop a dialog confirming I want to build...
3
by: NickP | last post by:
Hi there, Today I try to compile an application of mine and I am getting a whole list of bizaar errors.... ------------------------------------------------ Error 1 The...
6
by: =?Utf-8?B?YXByMDUyNA==?= | last post by:
I am wondering if there is a devenv switch that will ignore build dependencies that are set in .xxproj files. At the command line I am attempting to build individual projects that I do not want...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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,...

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.