How to make a .exe?

Mar 19, 2012 at 9:22pm
I need help making a .exe that runs a program! Please Help :'(
(I know it sounds stupid but please help!)
I do know Execute:
-o executable [namehere].out [sourcename].c
Mar 19, 2012 at 9:23pm
Are you asking us how to make a program, or asking us how to make a program that starts another program?

If the latter, it depends on your operating system. What operating system?
Mar 19, 2012 at 11:19pm
This looks like the command to make source code into an object file which is what you do right before you compile it into an executable. Here is the FAQ for Mingw, but with out knowing what compiler you are using I can't be of more help then this: http://www.mingw.org/wiki/MinGWforFirstTimeUsers
Mar 19, 2012 at 11:26pm
closed account (S6k9GNh0)
You might be able to find a tutorial on the C/C++ toolchain somewhere on the internet that explains the generic chain of actions involved in creating a binary executable.
Last edited on Mar 19, 2012 at 11:27pm
Mar 20, 2012 at 2:55am
undoubtedly and absolutely, the tool you should utilize would be Visual Studio 2005/2008 or some stuff like that.
Mar 20, 2012 at 3:14am
$ g++ hello_world.cpp
$ ./a.out
Hello World!
$


man gcc
Mar 20, 2012 at 5:55am
Im pretty sure he wants to compile some code hes been writting in his compiler into a .exe, so he can run it on any computer without needing his compiler. Correct me if im wrong
Mar 20, 2012 at 10:38am
I think I have the same problem.

Let's say I have the Hello World program and I want to send it to one of my non-programmer friends. Then I could write it, compile it, upload it to rapidshare (or something) for my friend to download.

The problem would be that i'm running a linux machine and he's running windows. Therefore if I compiled the program, it wouldn't run on his computer.

Since he isn't a programmer he can't compile the source code.

So the solution would be for me to compile the program into a .exe and upload that. How do I compile directly to a .exe file?
Mar 20, 2012 at 10:46am
Last edited on Mar 20, 2012 at 11:00am
Mar 20, 2012 at 3:14pm
it is trivial if you have ever used an external library and are familiar with linking, there is a great tutorial for cross compiling from linux to windows in codeblocks here http://forums.codeblocks.org/index.php/topic,3343.0.html
Topic archived. No new replies allowed.