Solved Help precompiled boost library
-
@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?
-
Before trying to build a project with a static version of Qt, build it with the standard dynamic version.
Note that the
-std=c++11
is not an option for VS. -
@SGaist i used this and the first error doesnt appear:
QMAKE_CXXFLAGS += /FSBut now show me still show me the last:
C:\Users\moh\Desktop\boost-1.60.0-x64-vs2013\boost64-1.60.0-vs2013\include\boost-1_60\boost\type_traits\common_type.hpp:42: error: C1001: Error internal in the compilerAnd when i click this is the part alert me:
namespace type_traits_detail
{template<class T1, class T2, class... T> using common_type_fold = common_type_t<common_type_t<T1, T2>, T...>; //here
}