步骤

  • 下载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. 查询总耗CPU最多与平均耗CPU最多的SQL语句

    总耗CPU最多的前20个SQL total_worker_time AS [总消耗CPU 时间(ms)],execution_count [运行次数], qs.total_worker_time AS ...

  2. Vue+elementui +Springboot session丢失解决方案

    前后端分离项目   由于端口不一致会出现跨域问题   解决跨域以后又会出现前后端sessionID不一致 首先跨域问题    跨域可以在前端配置代理 proxyTable: { '/': {    / ...

  3. dubbo入门学习笔记之入门demo(基于普通maven项目)

    注:本笔记接dubbo入门学习笔记之环境准备继续记录; (四)开发服务提供者和消费者并让他们在启动时分别向注册中心注册和订阅服务 需求:订单服务中初始化订单功能需要调用用户服务的获取用户信息的接口(订 ...

  4. Swing学习2——图标添加Icon接口使用

    废话没有,看代码. 主要就是通过实现Icon接口在标签添加一个圆形图标,并在框架中显示. package com.sword.swing_test; import javax.swing.*; imp ...

  5. mysql 5.7安装图解 mysql 5.7图文安装完整教程

    今天给搭建分享一个教程,mysql 5.7的安装操作,这里呢我叫大家怎么用二进制去安装mysql,其实在大多数的生产环境中使用二进制预编译的安装方式是最多了,下面大家跟着我的步骤去尝试着安装下吧. 先 ...

  6. Openresty 进行限流的方法

    1.使用Openresty进行限流, 使用漏桶原理进行设计 和路由系统设计类似. LUA脚本去通过变量去redis取值,从redis中得到队列的大小.漏和桶的大小. 然后通过比较,队列大小与漏和桶进行 ...

  7. JAVA8集合之List

    目录: 一.ArrayList概述 二.ArrayList的实现 1)成员变量 2)构造方法 3)元素添加 4)元素删除 5)元素修改 6)集合容量调整 7)集合转数组 三.总结 一.ArrayLis ...

  8. javaEE练习(商城练习)

    今天写一个商城的练习,综合之前学习过的servlet和el表达式,来一个综合的练习: 需要用到的数据库有: /* Navicat MySQL Data Transfer Source Server : ...

  9. org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.zhuoshi.entity.Dep#1]

    报错信息: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.zhuoshi.e ...

  10. 帝国cms中下拉框select的绑定

    在修改数据模型中,将下拉框的表示代码换成下: 将id换成自己的id地址.数据库查询中的classid换成自己创建栏目的id. <select name="diqu" id=& ...