步骤

  • 下载https://github.com/luabind/luabind/tree/0.9。 其最后一次commit为

    Revision: 8c66030818f0eacbb7356c16776539b55d8c5319
    Author: Peter Colberg <peter.colberg@utoronto.ca>
    Date: 12/24/2011 1:53:29 AM
    Message:
    Lua 5.2: use new macro lua_pushglobaltable

    This macro is not mentioned in the Lua 5.2 manual.
    ----
    Modified: luabind/object.hpp
    Modified: src/scope.cpp

  • 添加#include "luabind_compatibility.hpp",内容为
  • /*
    @Author Sygn (https://github.com/sygn-jp) This file is from https://github.com/sygh-JP/CompactLua . Detailed descriptions could be found
    at the author's blog: http://sygh.hatenadiary.jp/entry/2014/06/22/000456 (Japanese only).
    */ #pragma once #include <lua.hpp>
    #include <boost/version.hpp> // Luabind 0.9.1 uses "boost::operator" but it has been moved to "boost::iterators::operator" in Boost 1.57.0 or later.
    // As a result, many compilation errors will occur at the macro "LUABIND_OPERATOR_ADL_WKND" in "luabind/object.hpp".
    // One of the best and wisest solutions is to modify the source code of Luabind directly.
    // As an alternative way, the following workaround can avoid modifying it but is unbeautiful and pollutes the namespace "boost". #if (BOOST_VERSION >= 105700)
    #include <boost/operators.hpp>
    namespace luabind
    {
    namespace detail
    {
    // Forward declaration
    template<typename T> class basic_iterator;
    }
    }
    namespace boost
    {
    template<typename T> bool operator ==(
    const luabind::detail::basic_iterator<T>& x,
    const luabind::detail::basic_iterator<T>& y)
    {
    return boost::iterators::operator ==(x, y);
    } template<typename T> bool operator !=(
    const luabind::detail::basic_iterator<T>& x,
    const luabind::detail::basic_iterator<T>& y)
    {
    return boost::iterators::operator !=(x, y);
    }
    }
    #endif
  • 为config。h,和lua_include.hpp 添加#include "luabind_compatibility.hpp"
  • 在policy。hpp添加
  • LUABIND_NUMBER_CONVERTER(long double, number)
    LUABIND_NUMBER_CONVERTER(__int64, number)
    LUABIND_NUMBER_CONVERTER(unsigned __int64, number)

如何编译luabind支持vs2010之后所有版本的更多相关文章

  1. Sandcastle Help File Builder(.NET帮助文档工具)的版本选择心得——支持VS2010至VS2015,高版本项目文件问题

    作者: zyl910 一.缘由 "Sandcastle Help File Builder"(简称SHFB)是一个很好用.NET 帮助文档生成工具. 但它的每个版本支持的VS版本范 ...

  2. 详细地jsoncpp编译方法 和 vs2010中导入第三方库的方法

    详细地jsoncpp编译方法 和 vs2010中导入第三方库的方法 一 编译链接 1 在相应官网下载jsoncpp 2 解压得到jsoncpp-src-0.5.0文件 3 打开jsoncpp-src- ...

  3. 编译安装HTTPD 2.4.9版本

    编译安装HTTPD 2.4.9版本    服务脚本:/etc/rc.d/init.d/httpd    脚本配置文件路径:/etc/sysconfig/httpd    运行目录:/etc/httpd ...

  4. ios 编译openssl支持arm64(转)

    最近在编译支付宝 快捷支付(无线) ios 端的时候发现demo不支持arm64.在网上找了下,看到客服说是openssl的库文件不支持arm64,于是自己编译了支持arm64的库文件,发现还是不行, ...

  5. 编译GDAL支持ArcObjects

    编译GDAL支持ArcObjects. 首先修改nmake.opt文件中对应的ArcObjects,修改后的如下所示: #uncomment to use ArcObjects ARCOBJECTS_ ...

  6. VS2015编译GEOS的debug和release版本

    目前GEOS最新的3.7.1版本支持camke进行编译.经过尝试发现通过cmake生成的工程在vs2015下面编译的时候还是存在问题,而且在中文网上也没找到解决方案. 所以还是采用了nmake进行编译 ...

  7. json库的编译方法和vs2010中导入第三方库的方法

    json库的编译方法和vs2010中导入第三方库的方法 一.去相应官网下载json.cpp文件 Jsoncpp下载:https://sourceforge.net/projects/jsoncpp/  ...

  8. nginx编译安装支持lua脚本

    一.准备编译环境 1.操作系统:CentOS7.6 2.安装编译所需安装包 yum install gcc pcre pcre-devel zlib zlib-devel openssl openss ...

  9. 动态编译库 Natasha 5.0 兼容版本发布

    Natasha 5.0 版本已于 2022/10/10 日发布, 此次大版本更迭带来了兼容性支持, 目前 Natasha 可以兼容 standard2.0 及 coreapp3.1 以上版本. 下载使 ...

随机推荐

  1. shell编程(二)

    第三十二次课 shell编程(二) 目录 十五.shell中的函数 十六.shell中的数组 十七.告警系统需求分析 十八.告警系统主脚本 十九.告警系统配置文件 二十.告警系统监控项目 二十一.告警 ...

  2. Linux系统调用列表(转)

    以下是Linux系统调用的一个列表,包含了大部分常用系统调用和由系统调用派生出的的函数.这可能是你在互联网上所能看到的唯一一篇中文注释的Linux系统调用列表,即使是简单的字母序英文列表,能做到这么完 ...

  3. 循环输出ViewBag集合

    <tr>            <td>                权限分配:            </td>            <td>   ...

  4. 20175224 2018-2019-2 《Java程序设计》第九周学习总结

    教材学习内容总结 第11章 JDBC与MySOLz数据库 MySQL数据库管理系统,简称MySQL. 使用步骤: 启动MySQL数据库服务 器建立连接: 建立数据库: 创建表等操作. JDBC:为专门 ...

  5. bootstrap-fileinput视频上传

    在页面编写一个input框: <input id="input-repl-3a" name="videoFileAddress" type="f ...

  6. 对于一个段错误(核心已转储)问题的解答,错误的英文翻译是segment fault(core dumped)

    笔者在学习ROS的时候遇到的这个问题,使用的系统是ubuntu16.04,ROS版本是kinetic,在运行小海龟程序的时候突然打不开海龟界面的程序节点turtlesim-node,四处寻找答案未果, ...

  7. jmeter的几种参数化使用方法

    场景:在进行jmeter的接口自动化测试脚本的编写中需要使用参数化,现将接触到的几种参数化方法整理如下: 第一种: 使用“用户自定义变量”的配置元件来进行变量定义 填入变量.值.和备注就可以在后续的接 ...

  8. mysql的sql执行计划

    实际项目开发中,由于我们不知道实际查询的时候数据库里发生了什么事情,数据库软件是怎样扫描表.怎样使用索引的,因此,我们能感知到的就只有 sql语句运行的时间,在数据规模不大时,查询是瞬间的,因此,在写 ...

  9. SpringCloud 教程

    参考http://blog.csdn.net/forezp/article/details/70148833 出自方志朋的博客

  10. Linux系统上安装、卸载JAVA、TOMCAT的方法

    一. 安装JAVA 安装方法1:手工上传 创建安装目录上传JAVA安装包 Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE /* Styl ...