M
M
Miroslav Greitan2021-10-09 22:56:04
C++ / C#
Miroslav Greitan, 2021-10-09 22:56:04

How to make a c++ application in windows?

Maybe a stupid question for you, but still.
Suppose I have a program written in C++. Is it possible to somehow make this program an application, that is, do not run code blocks or visual studio, open this program there, but simply click on the shortcut and the program will start itself? Is it possible to send the folder with this app to a friend and have it work (even if it doesn't have code blocks or visual studio)? And if in the program I use some third-party libraries that it does not have?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2021-10-09
@MirBy23

Um... visual studio is compiling the program. An exe file will appear in some folder like Build / release in the project folder. Here it can be run and even copied to other computers.
As for libraries, firstly, there are Visual Studio Redistributables for built-in libraries, which are needed by many programs and most likely already have a friend. If not, then the program will ask you to install them at startup. All your third-party libraries can be distributed along with the exe file as a dll.
Well, or google static linking - you can configure the compiler to embed all libraries directly into the exe file. Then you can only copy it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question