如何编译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 以上版本. 下载使 ...
随机推荐
- git pull提交代码遇到的问题
git pull 提示如下错误 解决方法: git pull 后面加上分支具体地址 比如:git pull origin daily/1.0.0 同样git push origin daily/1. ...
- HTML+css基础认识
标签:<div><span ...
- elasticsearch(2) 数据操作——查询
一 文档 ES面向文档,并且使用JSON作为文档序列化格式,对于ES来说,文档特指根对象序列化成的JSON数据,以唯一ID标识并存储于ES中. 文档元数据 三个必须的元数据节点 1._index ...
- Qt 快捷键
- Java学习——类与对象
在学习面向对象之前首先我们要理解一下几点: 什么是面向对象 对象的概念 类 类与对象的关系/区别 什么是对象的属性 什么是对象的方法 什么是面向对象.对象.类 讲到面向对象就不得提到面向过程,早期的计 ...
- 【原创】ACR傻瓜式破解IC芯片卡
1.简介: 智能卡(英语:Smart card 或IC Card),又称智慧卡.聪明卡.集成电路卡及IC卡,是指粘贴或嵌有集成电路芯片的一种便携式卡片塑料.卡片包含了微处理器.I/O接口及存储器,提供 ...
- Hadoop学习------Hadoop安装方式之(三):分布式部署
这里为了方便直接将单机部署过的虚拟机直接克隆,当然也可以不这样做,一个个手工部署. 创建完整克隆——>下一步——>安装位置.等待一段时间即可. 我这边用了三台虚拟机,分别起名master, ...
- TP5 model层 返回的对象转数组
打开 database.php 增加或修改参数'resultset_type' => '\think\Collection',即可连贯操作 model('user')->select()- ...
- django项目中购物车的实现
对于做项目而言,最重要的是分析清楚自己负责模块的思路,确定思路后,把每一步实现的步骤确定后,根据步骤,去实现代码,测试. 购物车的逻辑: 登录用户可以添加购物车,未登陆用户页可以添加到购物车 ...
- python面试题收集
1.请问如何修改以下Python代码,使得下面的代码调用类A的show方法? class A(object) def show(self): print 'derived show' class B( ...