[mlpack] compile with Xcode

Ryan Curtin ryan at ratml.org
Fri Jan 30 09:25:40 EST 2015


On Fri, Jan 30, 2015 at 10:11:55PM +0800, Shangtong Zhang wrote:
> Hi,
> 
> 
> I updated my forked mlpack to the latest and try to build it.
> I use‘cmake ../‘to generate makefile, then everything is OK.
> But when I use‘cmake -G“Xcode”‘ to get a xcode project,
> I meet errorwhen compiling inXcode.
> In line 53, regression_distribution.hpp,
> RegressionDistribution(const arma::mat predictors,
>             const arma::vec responses) :
>    rf(regression::LinearRegression(predictors, responses))
>  {
>   err = GaussianDistribution(1);
>   arma::mat cov(1, 1);
>   cov(0, 0) = rf.ComputeError(predictors, responses);
>   err.Covariance(std::move(cov));
>  }
> I get an error : No matching member function for call to Covariance
> Before I update, I can build it in xcode successfully.
> Can anyone help me ? My OS is mavericks.

Hi Shangtong,

Can you provide more error output?

The GaussianDistribution::Covariance(arma::mat&) was recently defined in
a patch by Stephen, so I wonder if maybe the error is some artifact of a
previous compilation making the environment dirty.  Maybe this is a long
shot, but try cleaning the build directory (or removing it entirely and
reconfiguring cmake) and see if that helps...

Thanks,

Ryan

-- 
Ryan Curtin    | "Get out of the way!"
ryan at ratml.org |   - Train Engineer Assistant


More information about the mlpack mailing list