Solved Help precompiled boost library
-
Hi i am using one project open source with boost libraries but i must to include it. So i was searching i found one site with boost precompiled:
http://www.npcglib.org/~stathis/blog/precompiled-boost/#comment-71476In my case i use vs2013 and qt 5.7. I must to include these libraries like always or i need to do something more? Bye and thx
-
Did you ever had a look to the boost webpage?
There are quite a number of different parts of boost or different boost libs. Some of them are simply template libraries which do not require precompilation respectively you cannot compile separately.Therefore, it would be good for you to check up-front, which part of the boost libs you need. Possibly you do not need any of those.
If you require a section boost libs with compilable cpp-source file, then you can pick the correct one for your compiler and check, if the memory and all fits your needs. -
@koahnig i need these:
#include <boost/bind.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/random/discrete_distribution.hpp>
#include <boost/random/exponential_distribution.hpp>
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/random_number_generator.hpp>
#include <boost/random/uniform_int_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>
#include <boost/random/variate_generator.hpp>
#include <boost/program_options.hpp>
#include <boost/thread.hpp> -
@koahnig I never took boost or nothing like this. I listened about can be installed with vs2013 anyways i couldn't ..
-
Hi,
What couldn't you ?
-
@SGaist Hi i cant use boost libraries with vs2013 i need to include them. I was trying with precompiled boost:
http://www.npcglib.org/~stathis/blog/precompiled-boost/#comment-71476
But anyways i dont know if i need to include the reference to these libraries. I'm little lost . -
What have you tried ?
What error did you get ? -
@SGaist i only included these libraries:
#include <boost/bind.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/random/discrete_distribution.hpp>
#include <boost/random/exponential_distribution.hpp>
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/random_number_generator.hpp>
#include <boost/random/uniform_int_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>
#include <boost/random/variate_generator.hpp>
#include <boost/program_options.hpp>
#include <boost/thread.hpp>And trying to guess how to include the compiled library only tried that.
-
Did you update your .pro file to add the path where the boost includes can be found to
INCLUDEPATH
?
Did you update your .pro file to add the path where the boost .lib files can found toLIBS
?
Did you update your .pro file to add the boost libraries matching your include to link to ? -
This post is deleted! -
Yes, you should add the base path to the include in
INCLUDEPATH
otherwise your includes won't work.You have
"C:\Users\moh\Desktop\boost-1.60.0-x64-vs2013\boost64-1.60.0-vs2013\include\boost-1_60\boost\random"
, all your includes start withboost
and not all your includes comes fromboost/random
. So remove these two folders from the path. -
@SGaist I tried with boost but i think the library i need to include other?
i tried this:
LIBS += -boost_random-vc120-mt-gd-1_60 -LC:/Users/moh/Desktop/boost-1.60.0-x64-vs2013/boost64-1.60.0-vs2013/lib
INCLUDEPATH += "C:\Users\moh\Desktop\boost-1.60.0-x64-vs2013\boost64-1.60.0-vs2013\include\boost-1_60\boost"Sorry again a lot!
-
Again, all your includes start with
boost
so that folder must not appear in yourINCLUDEPATH
statement. -
@SGaist Ok sorry you are right the issue solved. But one details about the project that i use boost:
Ok i included libraries boost but now i am trying to run one easy example but when i try i get this message:
C:\Users\moh\Documents\intento\scheduler.cpp:-1: error: C1041: no puede abrir la base de datos de programa 'c:\users\moh\documents\build-intento-qt_5_7_0_msvc2013_static-debug\debug\intento.pdb'. Si varios CL.EXE escriben en el mismo archivo .PDB, use /FS.You know about this or can me take some advice?
-
With the text in english it will be easier to help.
-
@SGaist Ok the text is:
C:\Users\moh\Documents\intento\scheduler.cpp:-1: error: C1041: can't open the data bases of the program 'c:\users\moh\documents\build-intento-qt_5_7_0_msvc2013_static-debug\debug\intento.pdb'. If several cl.exe write in the same file .PDB, use /FS -
@SGaist And when i try to compile with vs2013 i get this:
i put nmake
and show me:
cl .\main.cpp .\scheduler.cppcl : Línea de comandos warning D9002 : se omite la opción desconocida '-std=c++11'
main.cpp
c:\users\moh\documents\intento\scheduler.h(5) : fatal error C1014: hay demasiados archivos de inclusión : nivel = 1024
scheduler.cpp
c:\users\moh\documents\intento\scheduler.h(5) : fatal error C1014: hay demasiados archivos de inclusión : nivel = 1024
Generando código...
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 12.0\VC\BIN\cl.EXE"' : código devuelto '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : código devuelto '0x2'
Stop. -
the project is: https://github.com/gavinandresen/bitcoin_miningsim
-
Are you trying to build that project with a static self-built Qt ?
-
@SGaist yes static built. I use static and show me this: C:\Users\moh\Documents\intento\main.cpp:-1: error: C1041: no puede abrir la base de datos de programa 'c:\users\moh\documents\build-intento-qt_5_7_0_msvc2013_static-debug\debug\intento.pdb'. Si varios CL.EXE escriben en el mismo archivo .PDB, use /FS. But i think maybe is other reason not build? some suggestion?