webrtc-sdk / libwebrtc

A C++ wrapper for binary release, mainly used for flutter-webrtc desktop (windows, linux, embedded).
MIT License
400 stars 78 forks source link

使用jpeg库时,boolean会重复定义 #49

Closed zjzhang-cn closed 1 year ago

zjzhang-cn commented 2 years ago

rpcndr.h定义的boolean 会与 jmorecfg.h定义的boolean冲突 image image image

nikohpng commented 1 year ago

相同的问题,有解决方法吗

nikohpng commented 1 year ago

解决了,安装官网win编译jconfig.h.in所说:

/* Define "boolean" as unsigned char, not int, per Windows custom */
#ifndef __RPCNDR_H__            /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean;
#endif
#define HAVE_BOOLEAN            /* prevent jmorecfg.h from redefining it */

在build.gn 或者 引入上面加入 HAVE_BOOLEAN 即可

cloudwebrtc commented 1 year ago

冲突已修复 https://github.com/webrtc-sdk/libwebrtc/commit/0372921774314aee674758f39f2dfae8329830d1