Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. The procedure entry point `wcsncpy_s` could not be located in the dynamic link library `msvcrt.dll`

The procedure entry point `wcsncpy_s` could not be located in the dynamic link library `msvcrt.dll`

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 631 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LinArcX
    wrote on 3 Jan 2021, 12:40 last edited by
    #1

    Hi. I statically compiled qt 5.6.3 with MSVC2013 on windows 7(target -> XP), like this:

    ..\..\..\source\configure -debug-and-release -opensource -confirm-license -openg
    l dynamic -no-warnings-are-errors -static -nomake tools -nomake examples -nomake tests -skip qtwebengine -skip qtwayland -skip
    qtandroidextras -skip qtmacextras -skip qtx11extras -target xp -prefix "D:\myqt\5.6.3\install\msvc2013\32bit-static-only"
    

    And i compiled a sample QtWidget application on windows 7. everything works like a charm.
    But if i try to run this app on windows xp, i get the error that i mentioned.

    Visual c++2013 redistributable alread installed.

    J 1 Reply Last reply 3 Jan 2021, 13:22
    0
    • L LinArcX
      3 Jan 2021, 12:40

      Hi. I statically compiled qt 5.6.3 with MSVC2013 on windows 7(target -> XP), like this:

      ..\..\..\source\configure -debug-and-release -opensource -confirm-license -openg
      l dynamic -no-warnings-are-errors -static -nomake tools -nomake examples -nomake tests -skip qtwebengine -skip qtwayland -skip
      qtandroidextras -skip qtmacextras -skip qtx11extras -target xp -prefix "D:\myqt\5.6.3\install\msvc2013\32bit-static-only"
      

      And i compiled a sample QtWidget application on windows 7. everything works like a charm.
      But if i try to run this app on windows xp, i get the error that i mentioned.

      Visual c++2013 redistributable alread installed.

      J Offline
      J Offline
      JonB
      wrote on 3 Jan 2021, 13:22 last edited by
      #2

      @LinArcX
      msvcrt.dll is a dynamic-linked DLL. I don't know how much of your end library/executable you intend to be static. It looks like wcsncpy_s --- which is a safe wide-character method --- is not in that DLL under XP.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        LinArcX
        wrote on 3 Jan 2021, 13:26 last edited by
        #3

        @JonB So, how can i solve this issue?

        1 Reply Last reply
        0
        • L Offline
          L Offline
          LinArcX
          wrote on 3 Jan 2021, 13:34 last edited by
          #4

          This is the output of profiler in dependency walker:

          --------------------------------------------------------------------------------
          Starting profile on 1/3/2021 at 5:32:08 AM
          
          Operating System: Microsoft Windows XP Professional (32-bit), version 5.01.2600 Service Pack 3
          Program Executable: z:\workspace\c++\qt\build-myqtwidgetstest-qt_5_6_3_msvc2013_32bit_static_only-release\release\MYQTWIDGETSTEST.EXE
          Program Arguments:
          Starting Directory: Z:\workspace\c++\qt\build-MyQtWidgetsTest-Qt_5_6_3_MSVC2013_32bit_static_only-Release\release\
          Search Path: C:\Python27;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin
          
          Options Selected:
               Simulate ShellExecute by inserting any App Paths directories into the PATH environment variable.
               Log DllMain calls for process attach and process detach messages.
               Hook the process to gather more detailed dependency information.
               Log LoadLibrary function calls.
               Log GetProcAddress function calls.
               Log first chance exceptions.
               Log debug output messages.
               Log a time stamp with each line of log.
               Automatically open and profile child processes.
          --------------------------------------------------------------------------------
          
          00:00:00.000: Started "MYQTWIDGETSTEST.EXE" (process 0x97C) at address 0x00400000.  Successfully hooked module.
          00:00:00.000: Loaded "NTDLL.DLL" at address 0x7C900000.  Successfully hooked module.
          00:00:00.010: Loaded "KERNEL32.DLL" at address 0x7C800000.  Successfully hooked module.
          00:00:00.010: DllMain(0x7C900000, DLL_PROCESS_ATTACH, 0x00000000) in "NTDLL.DLL" called.
          00:00:00.010: DllMain(0x7C900000, DLL_PROCESS_ATTACH, 0x00000000) in "NTDLL.DLL" returned 1 (0x1).
          00:00:00.010: DllMain(0x7C800000, DLL_PROCESS_ATTACH, 0x00000000) in "KERNEL32.DLL" called.
          00:00:00.010: DllMain(0x7C800000, DLL_PROCESS_ATTACH, 0x00000000) in "KERNEL32.DLL" returned 1 (0x1).
          00:00:00.010: Injected "DEPENDS.DLL" at address 0x08370000.
          00:00:00.020: DllMain(0x08370000, DLL_PROCESS_ATTACH, 0x00000000) in "DEPENDS.DLL" called.
          00:00:00.030: DllMain(0x08370000, DLL_PROCESS_ATTACH, 0x00000000) in "DEPENDS.DLL" returned 1 (0x1).
          00:00:00.040: Loaded "USER32.DLL" at address 0x7E410000.  Successfully hooked module.
          00:00:00.040: Loaded "GDI32.DLL" at address 0x77F10000.  Successfully hooked module.
          00:00:00.050: Loaded "ADVAPI32.DLL" at address 0x77DD0000.  Successfully hooked module.
          00:00:00.050: Loaded "RPCRT4.DLL" at address 0x77E70000.  Successfully hooked module.
          00:00:00.060: Loaded "SECUR32.DLL" at address 0x77FE0000.  Successfully hooked module.
          00:00:00.060: Loaded "MF.DLL" at address 0x00340000.  Successfully hooked module.
          00:00:00.060: Loaded "MSVCRT.DLL" at address 0x77C10000.  Successfully hooked module.
          00:00:01.312: First chance exception 0xC0000139 (DLL Not Found) occurred in "NTDLL.DLL" at address 0x7C967406.
          00:00:01.322: First chance exception 0xC0000139 (DLL Not Found) occurred in "NTDLL.DLL" at address 0x7C967406.
          00:00:01.322: Second chance exception 0xC0000139 (DLL Not Found) occurred in "NTDLL.DLL" at address 0x7C967406.
          00:00:01.322: Exited "MYQTWIDGETSTEST.EXE" (process 0x97C) with code -1073741511 (0xC0000139).
          
          1 Reply Last reply
          0

          2/4

          3 Jan 2021, 13:22

          • Login

          • Login or register to search.
          2 out of 4
          • First post
            2/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved