PDA

View Full Version : C++ Qt and Boost Multi-precision



SMF
3rd January 2019, 03:19
I created a C++ program in Xcode that had to be capable of dealing with extremely large numbers. I was able to download Boost Multi-precision and link it to Xcode and my program ran perfectly, able to deal with the large numbers I needed it to deal with. However, I've also recently begun to use Qt to construct my GUI for my C++ program, and have no idea how to use Boost in conjunction with Qt. Can anyone please help? Many thanks in advance.

d_stranz
3rd January 2019, 19:57
Simply include the appropriate Boost header files in the code where you want to use them. You can add an include path in Qt Creator so you don't have to type the entire path in the #include statement. If you are not using the built-in Boost Multiprecision back end, you will also need to provide the back end library to be linked in. Boost Multiprecision itself is a template library, so there is no link library needed for that, only for the back end. See the Boost docs. (https://www.boost.org/doc/libs/1_69_0/libs/multiprecision/doc/html/boost_multiprecision/intro.html)