Thread: How would I make a c++ prgoram make a .exe file?

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    731

    How would I make a c++ prgoram make a .exe file?

    How would I make a c++ prgoram make a .exe file?

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    Care to be more specific?
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    If this is a continuation of what you were talking about in a recent thread, then what you are wanting to do is make a compiler, which is extremely difficult. To make a complete compiled you will need to learn machine code (very smilar to assembly, but you will need to be writing binary), and get very good at processing the data in a C/C++ file (parsing).

    You could of course, have your C++ program write the C/C++ code it wants made into an .exe file into a text file, and then run it through a command-line compiler by using the system() command to call the compiler with the appropriate options. Just include the compiler with your program (if legal, of course).

    I would recommend the latter option. It's very simple and gets the job done just as well. The only problem is distributing the compiler with your program.

  4. #4
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    yes ok so as you might know by know I love game maker.

    So now I want to make a program, first, then a dll.

    In the program I want it to be able to compile a .exe program. I am trying to make a file splitter but I need someway to put it back together.

    I can't think of anythign else to add.

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Well if you're asking how to make a compiler, you're not going to get very far by asking how in a thread. They're talking about it over in the GD forum right now. You might get some ideas from monitoring that thread. Also browse through directory.google.com and look for some tutorials on compiler development.

  6. #6
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    well lactaully you gave me an awsome idea. Command Line Paramiters.

    Now, like you said, I need a free (and legal) compiler to give out. Small too.

  7. #7
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Well as long as you comply with the GNU Open Source License, you may be able to use one of the ports of GCC. I'm not sure what size you're likely to get.

  8. #8
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    lol well forget thsi whole thing.

    The person who made game maker, well... isn't the smartest in the world.

    sorry to waste your time...

  9. #9
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    How does game maker come into this?

    I'm curious...

  10. #10
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    lol dlls. Game Maker can take and use dlls. C++ can make dlls. That is where.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 06-16-2008, 01:18 PM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  3. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  4. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM
  5. using MAKE with makefile to create executable file
    By sballew in forum C Programming
    Replies: 1
    Last Post: 11-19-2001, 12:49 PM