Results 1 to 4 of 4

Thread: How to use GMP with Qt creator 5 (latest version) on Windows?

  1. #1
    Join Date
    Feb 2020
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Default How to use GMP with Qt creator 5 (latest version) on Windows?

    So I have downloaded the latest version of Qt Creator (5.something...) using the online Qt Downloader, and GMP version 6.2.0

    But I can't find any tutorials on how to use GMP library at all. And if I do, it's on Mac/Linux, which I can't use.

    So, how can I write a "Hello world" program using GMP in Qt Creator? A program that calculates 10000!, or e^1000 to 10^4 decimal places, for example.

    Thank you for reading.

    Edit: actually I don't need to use GMP, any high-precision float library is okay. What should I use in Qt? Thank you.
    Last edited by lehuyduc; 10th February 2020 at 16:16.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,481
    Thanks
    252
    Thanked 711 Times in 701 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: How to use GMP with Qt creator 5 (latest version) on Windows?

    Please do not double-post. Everyone who reads this forum will see your post whether you put it in the Qt Programming or Newbie sections. Don't put it in both places.

    In order to use any GNU libraries on Windows, you will probably have to also install and use the MinGW toolchain with the g++ compiler. Qt Creator can work with any toolchain - you will have to read the Qt Creator documentation regarding configuring a "kit" to use it.

    You will also have to install (or build from source code) a Qt distribution that was also built using the MinGW toolchain. You cannot mix and match libraries and DLLs built using g++ and Microsoft's VC++ compilers.

    If this seems like a lot of work, it is. You might be better off trying to find an MP library built for Windows or a GMP distribution built using your compiler. Google is probably your friend here.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Feb 2020
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to use GMP with Qt creator 5 (latest version) on Windows?

    Quote Originally Posted by d_stranz View Post
    Please do not double-post. Everyone who reads this forum will see your post whether you put it in the Qt Programming or Newbie sections. Don't put it in both places.

    In order to use any GNU libraries on Windows, you will probably have to also install and use the MinGW toolchain with the g++ compiler. Qt Creator can work with any toolchain - you will have to read the Qt Creator documentation regarding configuring a "kit" to use it.

    You will also have to install (or build from source code) a Qt distribution that was also built using the MinGW toolchain. You cannot mix and match libraries and DLLs built using g++ and Microsoft's VC++ compilers.

    If this seems like a lot of work, it is. You might be better off trying to find an MP library built for Windows or a GMP distribution built using your compiler. Google is probably your friend here.
    Thank you. It seems there's no easy way to do it on windows. I will try mingw tool.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,620
    Thanks
    13
    Thanked 1,592 Times in 1,520 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to use GMP with Qt creator 5 (latest version) on Windows?

    You might find that MPIR (http://www.mpir.org/index.html) can be built on Windows with MSVC if that is the compiler you have

  5. The following user says thank you to ChrisW67 for this useful post:

    d_stranz (12th February 2020)

Similar Threads

  1. How to upgrade to latest version on Windows 10?
    By mdemontbron in forum Newbie
    Replies: 1
    Last Post: 9th June 2016, 16:41
  2. Replies: 2
    Last Post: 16th November 2011, 22:19
  3. Upgrading to the latest version
    By adyb in forum Installation and Deployment
    Replies: 1
    Last Post: 26th July 2011, 16:57
  4. Replies: 0
    Last Post: 1st December 2010, 06:51
  5. Replies: 1
    Last Post: 19th October 2008, 21:30

Tags for this Thread

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.