Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: inzynier1979 on January 23, 2024, 05:25:05 pm

Title: i have problem plase check
Post by: inzynier1979 on January 23, 2024, 05:25:05 pm
Hi i make program he i not working because librarys whas not available he call libgcc_s_seh-1.dll and libstdc++-6.dll and libwinpthread-1.dll
i add this libraries to cataloge where is program to bin where is .exe after that he show me error _ZNKSt25_codecvt_utf8_utf16_baseIwe10do_unshiftER9_MbstatetPcS3_and  link destination file can you explain me that and help me fix that
Title: Re: i have problem plase check
Post by: Miguel Gimenez on January 23, 2024, 07:00:58 pm
You must use the three DLL from the same compiler used to compile your program, currently you are mixing versions.
Title: Re: i have problem plase check
Post by: inzynier1979 on January 23, 2024, 07:58:18 pm
whitch librarys? and how use that ?
Title: Re: i have problem plase check
Post by: inzynier1979 on January 23, 2024, 08:27:27 pm
like i add this three dll after that he show me problem
Title: Re: i have problem plase check
Post by: Miguel Gimenez on January 23, 2024, 08:41:23 pm
The DLL libraries you added (libgcc_s_seh-1.dll, libstdc++-6.dll and libwinpthread-1.dll) to the exe directory must come from the same compiler used to compile your program. Do not download random DLL from Internet or use the first one found in your computer.

C is not picky about mixing DLL from different sources, but C++ is because of name mangling.
Title: Re: i have problem plase check
Post by: inzynier1979 on January 23, 2024, 09:48:05 pm
I add three dlls still the same error i put to folder where are file exe still the same
Title: Re: i have problem plase check
Post by: Grit Clef on January 24, 2024, 02:53:27 am
An alternative way is that you can build the program using the -static switch, thus you won't need any extra dlls.
Title: Re: i have problem plase check
Post by: stahta01 on January 24, 2024, 03:09:25 am
An alternative way is that you can build the program using the -static switch, thus you won't need any extra dlls.

That may or may not work; but, the OP should be aware it rarely legal for projects that are not open source compatible.

Tim S.
Title: Re: i have problem plase check
Post by: inzynier1979 on January 24, 2024, 11:18:08 am
i Used -static and still the same try to find difrent solution
Title: Re: i have problem plase check
Post by: nenin on January 24, 2024, 12:16:43 pm
i Used -static and still the same try to find difrent solution
If you made proper static buid, .exe should call only system or  third-party  dlls. Do you use third-party libraries?
Title: Re: i have problem plase check
Post by: Miguel Gimenez on January 24, 2024, 12:25:57 pm
You must add also -static-libgcc and -static-libstdc++.
Title: Re: i have problem plase check
Post by: inzynier1979 on January 24, 2024, 01:37:57 pm
thankyou are working thx a lot
Title: Re: i have problem plase check
Post by: inzynier1979 on January 24, 2024, 02:48:39 pm
i add -static and rest like you toldme is not working but everything are work like i put line #define _CRT_SECURE_NO_WARNINGS program is working in code blocks and like i run file exe are work as well