By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,132 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,132 IT Pros & Developers. It's quick & easy.

Build an exe from another exe

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a

<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

P: n/a

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

P: n/a
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

P: n/a

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.