Question

I want to make a C++ program with Graphical User Interface, to be running on Windows platforms.

I want it to be independent from any libraries like .NET.

The reason I want this is because I want this program to be able to run everywhere, in every version of Windows (XP, VISTA, 7 - 32 & 64bit) without the user to be bound to have already installed a library like .NET.

Also, I want it to be portable: the whole program to consist from only one exe file.

So to summarize:

How can I make an one-exe-file GUI C++ program, able to run on all versions of Windows, without the need of pre-installed libraries on Windows from the user that uses it?

I have already MS Visual C++ 2010 Express and Eclipse with Cygwin's G++ compiler installed on my system.

Notice: I don't mind to use any libraries for windows GUI design if there is a way to embed them inside the executable file of the program.

Was it helpful?

Solution

You can either use a library that can be statically linked (MFC, WTL) or use Win32 API directly.

OTHER TIPS

WxWidgets have static linking capability, never tried it myself.

If you want portabiliy, and yet don't want to depend on 3rd party libraries... well you'll have to provide portability yourself! Don't do it! As adviced by OneOfOne, use Qt and be impressed how simple yet powerful it is. Good luck!

You can also use Qt5, works great on windows and when you figure out that windows isn't the only OS out there, you can easily port it to everything else.

License issues : Proprietary Source code + LGPL Source code

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top