- xmake gen a c++ project
xmake create -l c++ test
- xmake.lua
add_rules("mode.debug", "mode.release")
add_requires("boost", {configs = {all = true}})
target("xmake-opencv")
set_kind("binary")
add_files("src/*.cpp")
add_packages("boost")
- xmake 这一步会失败很多次,我也不知道原因
- src/main.cpp
#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>
int main()
{
using namespace boost::lambda;
typedef std::istream_iterator<int> in;
std::for_each(
in(std::cin), in(), std::cout << (_1 * 3) << " " );
}