M
M
Maxim2021-02-20 20:59:19
C++ / C#
Maxim, 2021-02-20 20:59:19

How to build a C++ project in 1 exe?

There is a small game written using SFML, and when I build in Visual Studio, the exe itself and a bunch of files + a few SFML DLLs that I put there myself so that there are no errors appear in the Release folder. Actually the question is: how to turn this whole thing into 1 exe, which can be simply run on any computer with windows, without carrying a bunch of other files along with it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Adamos, 2021-02-20
@XTerris

Search keywords you may not know are "static linking".
Instructions can be found in the FAQ on the library's website.
Note that for static linking, you will practically need to rebuild the entire library, satisfying its dependencies. This can be quite tricky, so, as already mentioned, if you just want to distribute everything in one file - make an installer.

M
Maxim Siomin, 2021-02-20
@MaxSiominDev

What's the point? I advise you to just create an installer using inno setup compilier

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question