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. Linking MSVCRT with Qt5.3
Qt 6.11 is out! See what's new in the release blog

Linking MSVCRT with Qt5.3

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt 5.3msvcrtmingw
8 Posts 3 Posters 4.2k 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.
  • P Offline
    P Offline
    Peppy
    wrote on last edited by
    #1

    Hello guys, I am trying to statically link library libmsvcrt.a in order to link the required _get_current_locale, which is an external library dependency.

    I've tried -lmsvcrt which does not seem to be working. Any idea how to link the needed function? I'm using Qt 5.3. with MinGW.

    jsulmJ raven-worxR 2 Replies Last reply
    0
    • P Peppy

      Hello guys, I am trying to statically link library libmsvcrt.a in order to link the required _get_current_locale, which is an external library dependency.

      I've tried -lmsvcrt which does not seem to be working. Any idea how to link the needed function? I'm using Qt 5.3. with MinGW.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Peppy Is libmsvcrt.a built with the same compiler?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Peppy

        Hello guys, I am trying to statically link library libmsvcrt.a in order to link the required _get_current_locale, which is an external library dependency.

        I've tried -lmsvcrt which does not seem to be working. Any idea how to link the needed function? I'm using Qt 5.3. with MinGW.

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by raven-worx
        #3

        @Peppy said:

        I've tried -lmsvcrt which does not seem to be working.

        i think i will never understand why so many people are expecting help in a forum but not saying what's actually not working... :)

        Whats the error, etc.?
        From where have you taken libmsvcrt.a?

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        1
        • P Offline
          P Offline
          Peppy
          wrote on last edited by
          #4

          The libmsvcrt.a is shipped with MinGW that is shipped with Qt 5.3
          What is not working: _get_current_locale is missing (undefined reference...)

          raven-worxR 1 Reply Last reply
          0
          • P Peppy

            The libmsvcrt.a is shipped with MinGW that is shipped with Qt 5.3
            What is not working: _get_current_locale is missing (undefined reference...)

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            @Peppy said:

            The libmsvcrt.a is shipped with MinGW that is shipped with Qt 5.3

            AFAIK this is not a static lib?!

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            0
            • P Offline
              P Offline
              Peppy
              wrote on last edited by
              #6

              It is not, hence I've assumed that if I do this

              #include <locale.h>
              //... 
              int main() {
                _locale_t t = _get_current_locale();
              }
              

              that it will work, because it's included in the header.

              raven-worxR 1 Reply Last reply
              0
              • P Peppy

                It is not, hence I've assumed that if I do this

                #include <locale.h>
                //... 
                int main() {
                  _locale_t t = _get_current_locale();
                }
                

                that it will work, because it's included in the header.

                raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on last edited by
                #7

                @Peppy
                only if the method's body is also in the header file of course.
                Otherwise it is missing and you get the error you already experienced.

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  Peppy
                  wrote on last edited by Peppy
                  #8

                  @raven-worx @jsulm And therefore I am looking for the way how to mangle the VCRT library into my project, it's mandatory.

                  1 Reply Last reply
                  0

                  • Login

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