Dear all,
I have no problem compiling specific code the following way:
g++ -I /opt/local/include Code1.cc -o Code1
However when I tried to do that in the makefile:
CXX = g++ -Wall -Werror -gstabs -pedantic -O2 -g
all: Code3 Code2 Code1
Code3: Code3.cc Tools.cc
$(CXX) $^ -o $@
Code2: Code2.cc Tools.cc
$(CXX) $^ -o $@
Code1: Code1.cc Tools.cc
$(CXX) -I /opt/local/include $^ -o $@
It complains. What's the correct way to do it? Note that only Code1.cc require the external library as include.
The header of Code1.cc looks like this:
#include <iostream>
#include <vector>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <boost/math/distributions/chi_squared.hpp>
using namespace std;
using boost::math::chi_squared;
using boost::math::quantile;
The error I get is as follows:
g++ -Wall -Werror -gstabs -pedantic -O2 -g -I/opt/local/include Code1.cc Tools.cc -o EstimateErrorMean
In file included from /opt/local/include/boost/detail/lcast_precision.hpp:16,
from /opt/local/include/boost/lexical_cast.hpp:31,
from /opt/local/include/boost/math/special_functions/gamma.hpp:23,
from /opt/local/include/boost/math/distributions/chi_squared.hpp:13,
from EstimateErrorMean.cc:19:
/opt/local/include/boost/integer_traits.hpp:164:66: error: use of C99 long long integer constant
/opt/local/include/boost/integer_traits.hpp:164:77: error: use of C99 long long integer constant
/opt/local/include/boost/integer_traits.hpp:170:70: error: use of C99 long long integer constant