Author Topic: i have problem plase check  (Read 1956 times)

Offline inzynier1979

  • Multiple posting newcomer
  • *
  • Posts: 15
i have problem plase check
« 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

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: i have problem plase check
« Reply #1 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.

Offline inzynier1979

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: i have problem plase check
« Reply #2 on: January 23, 2024, 07:58:18 pm »
whitch librarys? and how use that ?

Offline inzynier1979

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: i have problem plase check
« Reply #3 on: January 23, 2024, 08:27:27 pm »
like i add this three dll after that he show me problem

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: i have problem plase check
« Reply #4 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.

Offline inzynier1979

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: i have problem plase check
« Reply #5 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

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 61
  • Where there is a will, there is a way.
Re: i have problem plase check
« Reply #6 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.
-Windows 7, 32-bit
-CodeBlocks r13490, gcc 13.2.0, debug version

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: i have problem plase check
« Reply #7 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline inzynier1979

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: i have problem plase check
« Reply #8 on: January 24, 2024, 11:18:08 am »
i Used -static and still the same try to find difrent solution

Offline nenin

  • Almost regular
  • **
  • Posts: 212
Re: i have problem plase check
« Reply #9 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?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: i have problem plase check
« Reply #10 on: January 24, 2024, 12:25:57 pm »
You must add also -static-libgcc and -static-libstdc++.

Offline inzynier1979

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: i have problem plase check
« Reply #11 on: January 24, 2024, 01:37:57 pm »
thankyou are working thx a lot

Offline inzynier1979

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: i have problem plase check
« Reply #12 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