Results 1 to 11 of 11

Thread: Incompatible MSVCRT.dll

  1. #1
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Incompatible MSVCRT.dll

    I have this error message when running my Windows 7 compiled application on a Windows xp platform:

    "The procedure entry point _ftol2_sse cannot be found in the library msvcrt.dll"

    what should the fix be?
    Last edited by ahmdsd_ostora; 14th August 2010 at 09:34.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incompatible MSVCRT.dll

    Use the appropriate version of msvcrt.dll for your app.

  3. #3
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incompatible MSVCRT.dll

    Quote Originally Posted by fatjuicymole View Post
    Use the appropriate version of msvcrt.dll for your app.
    I don't understand this.

    should I overwrite the msvcrt.dll in the system32 folder?, if so, why my installer cannot edit anything in the system32 folder?

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incompatible MSVCRT.dll

    No, put it in the same folder as your executable.

  5. #5
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incompatible MSVCRT.dll

    i did your solution but no luck.

    I solved this problem by removing any system library from my installer except libgcc_s_dw2-1.dll
    Last edited by ahmdsd_ostora; 14th August 2010 at 11:34.

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incompatible MSVCRT.dll

    You should check the license before putting any dll into your installer. For example, msvcrt is a Microsoft library and they require that you distribute the "Microsoft Visual C++ Runtime Redistributable" rather than random DLLs.

  7. #7
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incompatible MSVCRT.dll

    what will be the harm if I ignored the license?

  8. #8
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incompatible MSVCRT.dll

    Quote Originally Posted by ahmdsd_ostora View Post
    what will be the harm if I ignored the license?
    Worse case? You get sued.
    Best case? They don't notice your app and so leave you alone.

    You should read the case against Christian Ghisler, who did a shareware app called Windows Commander. It was years before he received a cease and desist order from Microsoft, as they didn't like him using the name "Windows" in his software. Rather than going to court, he just changed the name (which, for a popular program, can be a complete nightmare - it's not exactly a simple recompile)

  9. #9
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incompatible MSVCRT.dll

    thanks for information.

  10. #10
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incompatible MSVCRT.dll

    Hello,

    Had a similar issue some time ago. I think you have two options :
    1) install the "Microsoft Visual C++ Runtime Redistributable" on your target PC (it can be downloaded from MS the website)
    2) build a fully static application

    Building a fully static application requires you to rebuild Qt as a 'static' build. For MingW, there still is a dependency on some mingw DLL. For VS, you have to make changes to the qmake.conf file in your mkspecs directory ( change the MD compiler flag to MT, and add /NODEFAULTLIB:”MSVCRT” to the linker flags).

    After several rebuilds and searching a lot of forums, I now finally have a standalone .EXE that I can just copy onto another PC

    Best regards,
    Marc

  11. #11
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incompatible MSVCRT.dll

    Don't forget static applications have different licensing requirements than dynamic ones. A lot of people seem to forget this.

Similar Threads

  1. Loading plugin and "Incompatible Qt library" issue.
    By TorAn in forum Qt Programming
    Replies: 4
    Last Post: 31st May 2010, 13:04
  2. Cannot mix incompatible Qt libraries
    By learning_qt in forum Qt Programming
    Replies: 2
    Last Post: 17th September 2009, 07:59
  3. Replies: 1
    Last Post: 29th June 2009, 09:49
  4. Replies: 0
    Last Post: 20th May 2009, 10:01
  5. Qt 4.3 incompatible with .NET framework 2.0 servicepack?
    By jobrandt in forum Installation and Deployment
    Replies: 3
    Last Post: 23rd February 2008, 09:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.