vs2015 编译obs studio 遇到的几个错误
1.
>D:\project\vs\obs\ObsProject\obs-studio\plugins\win-wasapi\win-wasapi.cpp(245): error C2065: “KSAUDIO_SPEAKER_2POINT1”: 未声明的标识符
1>D:\project\vs\obs\ObsProject\obs-studio\plugins\win-wasapi\win-wasapi.cpp(245): error C2131: 表达式的计算结果不是常数
1> D:\project\vs\obs\ObsProject\obs-studio\plugins\win-wasapi\win-wasapi.cpp(245): note: 非常量参数或对非常量符号的引用导致了故障
1> D:\project\vs\obs\ObsProject\obs-studio\plugins\win-wasapi\win-wasapi.cpp(245): note: 请参见“KSAUDIO_SPEAKER_2POINT1”的用法
解决方案:
再win-wasapi.cpp 内添加定义KSAUDIO_SPEAKER_2POINT1 宏:
#define KSAUDIO_SPEAKER_2POINT1 (KSAUDIO_SPEAKER_STEREO|SPEAKER_LOW_FREQUENCY)
2.
D:\project\vs\obs\ObsProject\obs-studio\plugins\win-wasapi\win-wasapi.cpp(245): error C2051: case 表达式不是常量
2>d:\project\vs\obs\obsproject\obs-studio\deps\json11\json11.hpp(110): error C2228: “.begin”的左边必须有类/结构/联合 (编译源文件 D:\project\vs\obs\ObsProject\obs-studio\deps\json11\json11.cpp)
2> d:\project\vs\obs\obsproject\obs-studio\deps\json11\json11.hpp(110): note: 类型是“add_rvalue_reference<_Ty>::type” (编译源文件 D:\project\vs\obs\ObsProject\obs-studio\deps\json11\json11.cpp)
2>d:\project\vs\obs\obsproject\obs-studio\deps\json11\json11.hpp(110): error C2227: “->first”的左边必须指向类/结构/联合/泛型类型 (编译源文件 D:\project\vs\obs\ObsProject\obs-studio\deps\json11\json11.cpp)
2>d:\project\vs\obs\obsproject\obs-studio\deps\json11\json11.hpp(111): error C2228: “.begin”的左边必须有类/结构/联合 (编译源文件 D:\project\vs\obs\ObsProject\obs-studio\deps\json11\json11.cpp)
2> d:\project\vs\obs\obsproject\obs-studio\deps\json11\json11.hpp(111): note: 类型是“add_rvalue_reference<_Ty>::type” (编译源文件 D:\project\vs\obs\ObsProject\obs-studio\deps\json11\json11.cpp)
2>d:\project\vs\obs\obsproject\obs-studio\deps\json11\json11.hpp(111): error C2227: “->second”的左边必须指向类/结构/联合/泛型类型 (编译源文件 D:\project\vs\obs\ObsProject\obs-studio\deps\json11\json11.cpp)
解决方案:
参考之前版本的json11 然后提换一下现在的json11文件。
具体差异:
再 json11.hpp 添加:
// declval example
#include <utility> // std::declval
#include <iostream> // std::cout
template<class T>
typename std::add_rvalue_reference<T>::type declval() noexcept;
using namespace std;
然后下面提换内容:
//此处最新版的代码编译会有问题所以注释起来还是使用之前版本的代码进行编译 by_songgp add20190422
/*
// Implicit constructor: anything with a to_json() function.
template <class T, class = decltype(&T::to_json)>
Json(const T & t) : Json(t.to_json()) {} // Implicit constructor: map-like objects (std::map, std::unordered_map, etc)
template <class M, typename std::enable_if<std::is_constructible<std::string, decltype((std::declval<M>()).begin()->first)>::value&& std::is_constructible<Json, decltype(std::declval<M>().begin()->second)>::value, int>::type = 0>
Json(const M & m) : Json(object(m.begin(), m.end())) {} // Implicit constructor: vector-like objects (std::list, std::vector, std::set, etc)
template <class V, typename std::enable_if<std::is_constructible<Json, decltype(*std::declval<V>().begin())>::value, int>::type = 0>Json(const V & v) : Json(array(v.begin(), v.end())) {} // This prevents Json(some_pointer) from accidentally producing a bool. Use
// Json(bool(some_pointer)) if that behavior is desired.
Json(void *) = delete; // Accessors
Type type() const;
*/ // Implicit constructor: anything with a to_json() function.
template <class T, class = decltype(&T::to_json)>
Json(const T & t) : Json(t.to_json()) {} // Implicit constructor: map-like objects (std::map, std::unordered_map, etc)
template <class M, typename std::enable_if<
std::is_constructible<std::string, typename M::key_type>::value
&& std::is_constructible<Json, typename M::mapped_type>::value,
int>::type = >
Json(const M & m) : Json(object(m.begin(), m.end())) {} // Implicit constructor: vector-like objects (std::list, std::vector, std::set, etc)
template <class V, typename std::enable_if<
std::is_constructible<Json, typename V::value_type>::value,
int>::type = >
Json(const V & v) : Json(array(v.begin(), v.end())) {} // This prevents Json(some_pointer) from accidentally producing a bool. Use
// Json(bool(some_pointer)) if that behavior is desired.
Json(void *) = delete; // Accessors
Type type() const;
3.
-preview.cpp(932): error C2719: 'transform': formal parameter with requested alignment of 16 won't be aligned
原因可能是因为vs2015 编译的是win3
解决方案:
修改 window-basic-preview.cpp 文件中
static bool IntersectBox(matrix4 transform, float x1, float x2, float y1,
float y2)
为下面的内容:
static bool IntersectBox(matrix4& transform, float x1, float x2, float y1,
float y2)
参考:
https://blog.csdn.net/kupepoem/article/details/44239193
vs2015 编译obs studio 遇到的几个错误的更多相关文章
- vs2015编译OBS-Studio
编译之前的准备: 系统win10 QT5.7.0 VS2015 CMake 3.13.4 obs vs2015环境依赖包:dependencies2015 obs-studio 24.0 ====== ...
- vs2015编译OBS-Studio21.1.12
原文地址:http://www.freesion.com/article/37445100/ 参考:https://blog.csdn.net/su_vast/article/details/7498 ...
- VS2015编译Qt5.7.0生成支持XP的静态库(很不错)
一.编译工具 1.VS2015 编译Qt5.7.0的所需VS版本:Visual Studio 2013 (Update1)或Visual Studio 2015 (Update2).因为Update补 ...
- Win7 下用 VS2015 编译最新 openssl(1.0.2j)包含32、64位debug和release版本的dll、lib(8个版本)
Win7 64位系统下通过VS2015编译好的最新的OpenSSL(1.0.2j)所有八个版本的链接库, 包含以下八个版本: 1.32位.debug版LIB: 2.32位.release版LIB: 3 ...
- VS2015编译FFMPEG,修改FFmpeg缓冲区大小解决实时流解码丢包问题,FFmpeg错误rtsp流地址卡死的问题,设置超时
之前尝试过很多网上利用Windows编译FFmpeg的文章,都没有办法编译X64位的FFmpeg,有些教程中有专门提到编译64位的FFmpeg需要下载mingw-w64-install,但是编译的过程 ...
- Windows下 VS2015编译RocksDB
VS2015编译RocksDB RocksDB 是一个来自 facebook 的可嵌入式的支持持久化的 key-value 存储系统,也可作为 C/S 模式下的存储数据库,但主要目的还是嵌入式.Roc ...
- Windows下 VS2015编译ForestDB
VS2015编译ForestDB ForestDB 是一个快速的 Key-Value 存储引擎,基于层次B +树单词查找树.由 Couchbase 缓存和存储团队开发. 1.下载forestdb源码 ...
- VS2015编译OpenSSL
概述 OpenSSL 是一个开源的第三方库,它实现了 SSL(Secure SocketLayer)和 TLS(Transport Layer Security)协议,被广泛企业应用所采用.对于一般的 ...
- 使用VS2015 编译 64位的boost库
别人写的编译参考: 目标:使用VS2015 编译 64位的boost库. 一直以来都是在Win32环境下Build和使用boost,但现在基本上每天都在64位Win7下工作,所以很有必要把这几天的经验 ...
随机推荐
- SparkStreaming+kafka Receiver模式
1.图解 2.过程 1.使用Kafka的High Level Consumer API 实现,消费者不能自己去维护消费者offset,而且kafka也不关心数据是否丢失. 2.当向zookeeper中 ...
- appium 操作界面
操作界面函数: 1.swipe():模拟滑动 2.tap():点击坐标 1.swipe()函数:用来模拟滑动操作 参数说明: 坐标就是x/y坐标 duration是滑动从起点到终点坐标所耗费的时间. ...
- H3C Short GI
- 26.centos7基础学习与积累-012-文件和目录的属性
从头开始积累centos7系统运用 大牛博客:https://blog.51cto.com/yangrong/p5 1.文件的属性(文件的信息描述): [root@python01 ~]# ls -l ...
- tomcat下载地址
https://archive.apache.org/dist/tomcat/tomcat-6/v6.0.53/bin/ Index of /dist/tomcat/tomcat-6/v6.0.53 ...
- ThinkPHP的路由规则和URL生成,结合django的URL理解
这个知识点,我觉得蛮重要的. 不作任何路由定义的TP,URL格式和controller之间,相当于强绑定. 路由配置,让URL和controller的关系可以自定义. URL生成,让controlle ...
- es题目
1.elasticsearch了解多少,说说你们公司es的集群架构,索引数据大小,分片有多少,以及一些调优手段 .2.elasticsearch的倒排索引是什么?3.elasticsearch 索引数 ...
- spring的声明式事务和编程式事务
事务管理对于企业应用来说是至关重要的,当出现异常情况时,它可以保证数据的一致性. Spring事务管理的两种方式 1.编程式事务 使用Transaction Ttempleate或者直接使用底层的Pl ...
- Thinkphp内核百度小程序输出接口
最近百度小程序比较火,自己站点用thinkphp打造的,所以写了这个Thinkphp的百度小程序输出接口,实现数据同步. 附上代码 <?php namespace app\article\con ...
- STM32启动代码详细分析
最近需要学习iap的功能,因此离不开stm32的启动代码的分析,以前看了很多遍,都看不懂,读书百遍,其义自见,因此我有看了一遍,下面的文章,挺好的,因此转载: 在上电复位后,我们都知道会先运行启动代码 ...