News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

i have problem plase check

Started by inzynier1979, January 23, 2024, 05:25:05 PM

Previous topic - Next topic

inzynier1979

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

Miguel Gimenez

You must use the three DLL from the same compiler used to compile your program, currently you are mixing versions.

inzynier1979

whitch librarys? and how use that ?

inzynier1979

like i add this three dll after that he show me problem

Miguel Gimenez

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.

inzynier1979

I add three dlls still the same error i put to folder where are file exe still the same

Grit Clef

An alternative way is that you can build the program using the -static switch, thus you won't need any extra dlls.
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

stahta01

Quote from: 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.

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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

inzynier1979

i Used -static and still the same try to find difrent solution

nenin

Quote from: inzynier1979 on January 24, 2024, 11:18:08 AM
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?

Miguel Gimenez

You must add also -static-libgcc and -static-libstdc++.

inzynier1979


inzynier1979

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