Author Topic: libstdc++-6.dll  (Read 1528 times)

Offline SamP

  • Single posting newcomer
  • *
  • Posts: 2
« 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
Re: libstdc++-6.dll
« Reply #1 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline gd_on

  • Lives here!
  • ****
  • Posts: 660
Re: libstdc++-6.dll
« Reply #2 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.
Windows 10 64 bits (21H1), svn C::B (last version or almost!), wxWidgets 3.1.5, Msys2 Compilers 10.3.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).