c++ - Joining two programs one with main() one with WinMain() -
i want combine 2 programs single executable. 1 open source program has rather complex project file, other 1 of mine simpler structure. because of relative complexities of project files feel make sense start open source project , modify include source files.
my intention program should in control , treat other collection of utility functions.
i noticed open source program has function called "main()" whereas mine has "winmain()". presumably have tell compiler call winmain() first. how do that?
is there else should aware of in merging process?
edit: both programs c++, not c.
edit: open source program little io.
edit: key thing want know have modify in project settings "this windows program using winmain() opposed console(?) program using main()" or compiler somehow work out itself.
update: joint program , running.
if program has winmain()
, presumably windows program, while other command-line app. depending on original apps do, may make difficult merge them. e.g. if other app uses standard input/output extensively, challenging transform windows app. however, if bunch of utility methods without side effects, may add code project , start using it.
you have set project generate windows executable, call winmain()
function arranged automatically linker.
Comments
Post a Comment