如何编译luabind支持vs2010之后所有版本
步骤
- 下载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_pushglobaltableThis 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之后所有版本的更多相关文章
- Sandcastle Help File Builder(.NET帮助文档工具)的版本选择心得——支持VS2010至VS2015,高版本项目文件问题
作者: zyl910 一.缘由 "Sandcastle Help File Builder"(简称SHFB)是一个很好用.NET 帮助文档生成工具. 但它的每个版本支持的VS版本范 ...
- 详细地jsoncpp编译方法 和 vs2010中导入第三方库的方法
详细地jsoncpp编译方法 和 vs2010中导入第三方库的方法 一 编译链接 1 在相应官网下载jsoncpp 2 解压得到jsoncpp-src-0.5.0文件 3 打开jsoncpp-src- ...
- 编译安装HTTPD 2.4.9版本
编译安装HTTPD 2.4.9版本 服务脚本:/etc/rc.d/init.d/httpd 脚本配置文件路径:/etc/sysconfig/httpd 运行目录:/etc/httpd ...
- ios 编译openssl支持arm64(转)
最近在编译支付宝 快捷支付(无线) ios 端的时候发现demo不支持arm64.在网上找了下,看到客服说是openssl的库文件不支持arm64,于是自己编译了支持arm64的库文件,发现还是不行, ...
- 编译GDAL支持ArcObjects
编译GDAL支持ArcObjects. 首先修改nmake.opt文件中对应的ArcObjects,修改后的如下所示: #uncomment to use ArcObjects ARCOBJECTS_ ...
- VS2015编译GEOS的debug和release版本
目前GEOS最新的3.7.1版本支持camke进行编译.经过尝试发现通过cmake生成的工程在vs2015下面编译的时候还是存在问题,而且在中文网上也没找到解决方案. 所以还是采用了nmake进行编译 ...
- json库的编译方法和vs2010中导入第三方库的方法
json库的编译方法和vs2010中导入第三方库的方法 一.去相应官网下载json.cpp文件 Jsoncpp下载:https://sourceforge.net/projects/jsoncpp/ ...
- nginx编译安装支持lua脚本
一.准备编译环境 1.操作系统:CentOS7.6 2.安装编译所需安装包 yum install gcc pcre pcre-devel zlib zlib-devel openssl openss ...
- 动态编译库 Natasha 5.0 兼容版本发布
Natasha 5.0 版本已于 2022/10/10 日发布, 此次大版本更迭带来了兼容性支持, 目前 Natasha 可以兼容 standard2.0 及 coreapp3.1 以上版本. 下载使 ...
随机推荐
- 【命令】Ubuntu设置和查看环境变量
转自[Ubuntu]Ubuntu设置和查看环境变量 查看环境变量 env env命令是environment的缩写,用于列出所有的环境变量 export 单独使用export命令也可以像env列出所有 ...
- windows分驱
步骤/方法 1 鼠标右击“计算机” 2 选择“管理”标签 3 打开“计算机管理”窗口 选择“磁盘“>>”存储管理“,打开”磁盘管理“页面 如图: 右键单击选择要压缩的磁盘(本例 ...
- Java容器解析系列(10) Map AbstractMap 详解
前面介绍了List和Queue相关源码,这篇开始,我们先来学习一种java集合中的除Collection外的另一个分支------Map,这一分支的类图结构如下: 这里为什么不先介绍Set相关:因为很 ...
- transfer model derived to fk model format
It should be noted that when using fk, the definition of model format is as belows: 1: 2: when using ...
- 总结vue中父向子,子向父以及兄弟之间通信的几种方式
子向父方式1:通过props,如例子中子组件test1.vue向父组件App.vue传值 App.vue代码 <template> <div id="app"&g ...
- Vue中transition和animation的使用
一:二者的对比 1.动画循环就用animation.在animation中有一个animation-iteration-count属性可以定义循环次数.transition是执行一次以后就不会执行,但 ...
- 2017年5月11日17:43:06 rabbitmq 消费者队列
从昨天开始发现个问题,一个接口在本地调用时大部分正常,一旦在生成者打一个断点调试,并且在promotion也打断点的时候会出现没有返回channel的异常,然后消费者就再也消费不了了 16:57:45 ...
- PHP 位运算
$a & $b a,b二进制后,取得每对应为都有1的部分,然后再转换为十进制 $a | $b a,b二进制后,取得每对应为只要有1的部分,然后再转换为十进制 $a >&g ...
- 基于vue开发的element-ui树形控件报错问题解决
对没错,这次又是ElementUI的问题,在使用ElementUI中的 tree 树形控件时需要动态添加DOM元素,但是在使用文档中给出的案例的时候会报错. 案例:ElementUI树形控件 - 自定 ...
- EM 算法最好的解释
https://wenku.baidu.com/view/fcb6a52bf5335a8102d220e3.html