Mingw

This is a discussion on Mingw within the Windows Programming forums, part of the Platform Specific Boards category; Hey, I'm trying to make a program that will make a self-extracting exe file. I think I'm going to use ...

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    16

    Mingw

    Hey,
    I'm trying to make a program that will make a self-extracting exe file. I think I'm going to use the mingw gcc compiler to do such, but is there a way that I can use it without having to install mingw? For the purpose of having other people use my program so that they don't need to install mingw in addition to my own program? The only files I would need would be stdio.h, stdlib.h, windows.h and g++.exe to compile it. Any suggestions or help would be greatly appreciated!
    Thanks!
    Blair

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,451
    You need to install MinGW to compile your own program for testing and distribution. Your users do not need to install MinGW unless they want to compile their own copy of your program.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    May 2007
    Posts
    16
    Right, I understand that. But for my program to create the selfextracting exe file I need to use mingw. My program is going to compile other self extracting files.

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    why not have the compiled program as the input instead of the source file?

  5. #5
    Registered User
    Join Date
    May 2007
    Posts
    16
    Quote Originally Posted by robwhit View Post
    why not have the compiled program as the input instead of the source file?
    I'm not sure what you mean by that? The purpose of the program is for more basic languages that require multiple files to run. My program will compile them all into one and then when the exe file my program created is run it will extract those files and then run the exe it extracts.

  6. #6

  7. #7
    Registered User
    Join Date
    May 2007
    Posts
    16
    Exactly like that. But I'd like to program it myself haha. I can do it if the user has installed mingw (compile the self extracting exe) but I don't want the user to have to install another program besides my own.

  8. #8
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    you'll have to assemble the exe yourself. You'll need knowledge of the PE file format (if you're using Windows) and some compression software.

  9. #9
    Registered User
    Join Date
    May 2007
    Posts
    16
    I've been able to create a program that does what I want it to. But its large and can't do very big files. Basically just writes a .c which fprintf every character of a file...slow...big...not the way to do it. What about creating a resource file? and then have the exe extract the information from the resource file? I'm not really sure if this could work, but lemme know if anyone thinks it could.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mingw and elcipse HELP
    By Rob4226 in forum Windows Programming
    Replies: 1
    Last Post: 03-04-2008, 12:35 AM
  2. MinGW thread-safe runtime libraries
    By Mario F. in forum C++ Programming
    Replies: 3
    Last Post: 08-21-2006, 08:15 AM
  3. Free compiler for commercial development? (mingw?)
    By kook44 in forum Windows Programming
    Replies: 8
    Last Post: 01-07-2006, 08:32 AM
  4. SDL and MinGW Studio
    By Vicious in forum Tech Board
    Replies: 0
    Last Post: 07-30-2004, 09:59 PM
  5. Convert Microsoft LIB to MingW compatible lib
    By tigs in forum Windows Programming
    Replies: 0
    Last Post: 07-20-2004, 06:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21