'Compile a .cpp file to an EXE inside of a program (EXE file) [closed]

I want to make a program (EXE file) that will take the user defined settings and make a custom (EXE) file for the user inside of the previously mentioned program (EXE). Is there like a portable GCC or something?

Please be as detailed as possible. I am not really sure where to start with this one.



Solution 1:[1]

Your best bet for this is to use an embedded resource - then use e.g. BeginUpdateResource and related functions to modify a precreated EXE file. The MSDN overview of resources contains the information you need to add a RT_RCDATA block to your EXE, retrieve its contents run-time, and modify its contents from another program.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Erik