Code::Blocks Forums

User forums => Help => Topic started by: SamP on April 20, 2021, 12:20:02 am

Title: libstdc++-6.dll
Post by: SamP on April 20, 2021, 12:20:02 am
I have been through if I am allowed to post this or not, and I'm not sure (seeing as I'm not sure what the problem is). I decided that it was my best bet to post it here as this forum seems like the right place.

I am new to proper coding, and I was recommended  Code::blocks. Originally, I only opened the program I was coding through code::blocks, but when trying to open the .exe I get an error saying it cannot run because libstdc++-6.dll is missing.
I am not sure if it is code::blocks or the compiler, if its the compiler I gather this is the wrong place to post this (if it is, can you tell me where to find help? :-\).

If it is code::blocks, what should I do?
Title: Re: libstdc++-6.dll
Post by: oBFusCATed on April 20, 2021, 12:41:36 am
It is the compiler. Just copy the mentioned dll next to the executable. It is available somewhere in the compiler's directory.
Title: Re: libstdc++-6.dll
Post by: gd_on on April 20, 2021, 11:25:10 am
As mentionned several times in this forum, you can also have problems with other dlls as  libgcc_*.dll or libwinpthread-1.dll.
You can add these in your .exe directory, OK.
But if you want to execute directly other compiled programs, you'll have the same problem. So, I think a good solution is to add the path of these dll, which is something like C:\MinGW\bin (but may be different for you), in your PATH variable. When you run your executable from inside codeblocks, codeblocks do the job for you, but only for itself.