I'm trying to setup an environment for my next project (which surprise surprise, involves boost) and have ran into an issue. As a bit of background, the c++ compiler and boost have been built from source. Anyways, here is the issue:
nchambers@nchambers-305E4A-305E5A-305E7A:~$ type g++-5.3.0
g++-5.3.0 is aliased to `g++-5.3.0 -I/home/nchambers/mini-bin/.binaries/boost_1_60_0/include -L/home/nchambers/mini-bin/.binaries/boost_1_60_0/lib'
nchambers@nchambers-305E4A-305E5A-305E7A:~$ cat test.cpp
#include <boost/regex.hpp>
#include <iostream>
#include <string>
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;
}
}
nchambers@nchambers-305E4A-305E5A-305E7A:~$ g++-5.3.0 -std=c++14 -Wall -Wextra -w test.cpp -o boosttest -lboost_system -lboost_regex
nchambers@nchambers-305E4A-305E5A-305E7A:~$ ./boosttest
./boosttest: error while loading shared libraries: libboost_system.so.1.60.0: cannot open shared object file: No such file or directory
nchambers@nchambers-305E4A-305E5A-305E7A:~$ [[ -f mini-bin/.binaries/boost_1_60_0/lib/libboost_system.so.1.60.0 ]] && echo 'file exists'
file exists
nchambers@nchambers-305E4A-305E5A-305E7A:~$
Any help would be much appreciated!