Just starting out with C++ again after a long break since Uni. I have some experience in other languages but am still a very much a beginner with C++.
I am trying to understand how I might create a program in C++ and have it run as an .exe file on other computers.
I have seen other posts stating that Code Blocks leaves a .exe file in the save directory, which it does, however when opening this .exe I get error messages stating that .dll files are missing. (libgcc_s_dwl2-1.dll, libstdc++-6.dll)
I get similar errors when trying to execute on a different Windows machine. I have a stand alone program in mind I wish to create but I will want it to be able to run on any windows machine without having to install anything additional.
please can someone tell me where I am going wrong.
Your version of MinGW does not statically link its runtime by default.
You'll find those DLLs in the /bin folder of wherever g++.exe is installed. You can copy them to the destination machine.
If you don't wish for the user of your program to have those DLLs, you can add the following compiler flags: