Code::Blocks Forums

User forums => Help => Topic started by: ajsbox on September 02, 2022, 03:10:03 pm

Title: Error when try to run a file inside bin/Debug in windows
Post by: ajsbox on September 02, 2022, 03:10:03 pm
When i try to run an console application inside /bin/Debug i got an error: libstdc++6.dll
I uninstall Code::Blocks but the problem can not be solve.

Title: Re: Error when try to run a file inside bin/Debug in windows
Post by: BlueHazzard on September 02, 2022, 04:10:05 pm
How did you install codeblocks?
In the sub folder of your installation there should be a folder called MinGW with a sub folder bin
go there and search for the libstdc++6.dll and copy it to your exe direcotry
you probably also need libgcc_s_seh-1.dll from the same folder

This is needed because your application is not statically linked and the open source compiler need some additional dlls (libstdc++6 is the standard library for c++). When you run it trough codeblocks, codeblocks adds the path MinGW/bin to the dll search paths automatically. If you run your executable by double klick this is not done, and your application can not find the dll
Title: Re: Error when try to run a file inside bin/Debug in windows
Post by: ajsbox on September 02, 2022, 04:18:51 pm
I went to C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0 but that file is not ther " libstdc++6.dll"
Title: Re: Error when try to run a file inside bin/Debug in windows
Post by: BlueHazzard on September 02, 2022, 05:12:24 pm
C:\Program Files\CodeBlocks\MinGW\bin
should be the folder