I had VS 2010 installed already installed in my system. So when i downloaded QT (I have to use QT as thats what the project req was in) ,i used this link and installed it. It was able to auto detect the visual C++ compilers and was working fine.
Now I downloaded boost library from boost.org and installed using the following commands from visual studio command prompt:-
> bootstrap.bat msvc
>
> c:\boost_1_54_0>b2 install --prefix=c:/boostinst toolset=msvc-10.0
> variant=debug ,release link=static threading=multi
after that i opened qt creator and added the following code cpp file
#include <boost/regex.hpp>
#include
#include
int main()
{
std::string line;
boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" );
while (std::cin)
{
std::getline(std::cin, line);
boost::smatch matches;
if (boost::regex_match(line, matches, pat))
std::cout << matches[2] << std::endl;
}
}
and added the library using ADD Library and the following .pro file was generated.
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
INCLUDEPATH += C:\boostinst\include\boost-1_54 #if i remove this line, then also the same error
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../boostinst/lib/ -llibboost_regex-vc100-mt-1_54
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../boostinst/lib/ -llibboost_regex-vc100-mt-1_54d
else:unix: LIBS += -L$$PWD/../../../boostinst/lib/ -llibboost_regex-vc100-mt-1_54
INCLUDEPATH += $$PWD/../../../boostinst/include
DEPENDPATH += $$PWD/../../../boostinst/include
When i try to build , it throws the following error
C:\Users\xxx\newcp\main.cpp:24: error: C1083: Cannot open include file: 'boost/regex.hpp': No such file or directory
Am i Missing something or doing something wrong? Please anyone respond as soon as possible.