Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to create a standalone-exe (Forms) (C++)

Tags:

c++

forms

I have to create an application for testing that is relatively simple. If a user plugs in a device into a USB (hid library), the form will say "Pass". If no device is detected, it will say "Fail".

I want to create the app to run on WinXP+. It must be a forms application as it needs to be visual and have colors. The biggest requirement for me is that it must be stand-alone (a user just double clicks, the file and it opens, no installation). I need to avoid installing any extra .dll files and want to avoid the .net framework all together. It has to be written in C++.

So my question is, what are my options? I am new to Forms applications and the only forms application I have written required the .net framework.

From my research, Visual C++ seems out of the question as it requires .net for Forms apps. What about Turbo C++ by Borland? It seems outdated, but can it do the job?

like image 945
skybox Avatar asked Jul 07 '11 17:07

skybox


3 Answers

I would suggest Borland C++ Builder 5 or 6. Visual C++ lacks the functionality to create C++ form apps, if we dismiss MFC

like image 177
Ulterior Avatar answered Oct 01 '22 10:10

Ulterior


I'd say Visual C++ would probably still be your best option. A standard simple Win32 C/C++ program using only the native API will should suite your needs just fine. If you're targeting XP+, then the only dependency would be "msvcrt.dll" which is included with Windows by default.

Edit: This article on MSDN should get you started in the right direction.

like image 23
Brandon Moretz Avatar answered Oct 01 '22 09:10

Brandon Moretz


What you're talking about is C++/CLI, it's microsoft's dialect of C++ that requires a .Net framework. Please distinguish it from real (native) C++, which can be used to create what you want to. Visual C++ is perfectly fine, just make sure you don't create a .Net project.

like image 42
Yakov Galka Avatar answered Oct 01 '22 09:10

Yakov Galka