mingw STLport配合boost::thread库或gSoap时编译错误
来源:互联网 发布:tomcat mac 安装 编辑:程序博客网 时间:2024/04/30 03:01
mingw 使用STLport配合boost::thread库或gSoap时,编译时会报以下错误
原文:http://sourceforge.net/projects/stlport/forums/forum/490891/topic/3036652
from ../Source/./gSoap/Linux/stdsoap2.h:663, from ../Source/./gSoap/Linux/soapStub.h:11, from ../Source/./gSoap/Linux/soapH.h:10, from ../Source/./gSoap/Linux/Service.nsmap:2, from ../Source/gSoap/SoapMap.cpp:11:c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/winbase.h:1848:49: error: declaration of C function 'LONG InterlockedDecrement(volatile LONG*)' conflicts with../../../C++library/STLport/stlport/stl/config/_windows.h:109:42: error: previous declaration 'long int InterlockedDecrement(long int*)' herec:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/winbase.h:1849:53: error: declaration of C function 'LONG InterlockedExchange(volatile LONG*, LONG)' conflicts with../../../C++library/STLport/stlport/stl/config/_windows.h:110:42: error: previous declaration 'long int InterlockedExchange(long int*, long int)' herec:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/winbase.h:1857:49: error: declaration of C function 'LONG InterlockedIncrement(volatile LONG*)' conflicts with../../../C++library/STLport/stlport/stl/config/_windows.h:108:42: error: previous declaration 'long int InterlockedIncrement(long int*)' here
include/winbase.h:1848:49: error: declaration of C function 'LONG InterlockedDecrement(volatile LONG*)' conflicts with
_windows.h:109:42: error: previous declaration 'long int InterlockedDecrement(long int*)' here
include/winbase.h:1849:53: error: declaration of C function 'LONG InterlockedExchange(volatile LONG*, LONG)' conflicts with
_windows.h:110:42: error: previous declaration 'long int InterlockedExchange(long int*, long int)' here
nclude/winbase.h:1857:49: error: declaration of C function 'LONG InterlockedIncrement(volatile LONG*)' conflicts with
_windows.h:108:42: error: previous declaration 'long int InterlockedIncrement(long int*)' here
如果使用 STLPort Mingw API 的 Windows 版本 3.12 (或更高版本),解决方法:
如果您的 STLport 是 5.2.x,只需打开文件"stlport\stl\config\user_config.h"取消注释宏 _STLP_NEW_PLATFORM_SDK。这将帮助STLport选择正确的InterlockedXXX 函数原型。
如果您的 STLport 5.1.x,您将必须:
1.修改上面的"stlport\stl\config\user_config.h"文件。
2.在文件"stlport/stl/config/_gcc.h"中,找到以下行:
# if defined (_STLP_NEW_PLATFORM_SDK)
/* For the moment the Windows SDK coming with Mingw still mimik the old platform SDK. */
# undef _STLP_NEW_PLATFORM_SDK
# endif
然后替换为:
# include <w32api.h>
# if (__W32API_MAJOR_VERSION > 3) || ((__W32API_MAJOR_VERSION = 3) && (__W32API_MINOR_VERSION >= 12))
# if !defined(_STLP_NEW_PLATFORM_SDK)
# define _STLP_NEW_PLATFORM_SDK 1
# endif
# endif
- mingw STLport配合boost::thread库或gSoap时编译错误
- mingw编译boost库之thread工程相关错误
- mingw下组建stlport+boost
- Mingw编译Boost库
- Mingw编译Boost库
- 编译stlport及boost
- 在MinGW下编译STLport
- Mingw连接boost thread库时的一个问题
- Windows环境下使用minGW编译boost库(windows下编译使用asio, thread等)
- stlport 5.20 结合boost 编译
- stlPort+boost的编译方法
- 编译安装STLport和Boost
- boost+mingw+codelite+thread配置
- VS2010 编译 boost thread库
- Windows下使用MinGW编译boost库
- 用MinGW编译Boost
- boost mingw 编译
- 使用MinGW编译boost
- 从程序乱码开始谈谈字符编码
- 调用EC后台分页代码
- 理解typename的两个含义
- xtree1.1的使用[学习笔记]
- xcode入门笔记
- mingw STLport配合boost::thread库或gSoap时编译错误
- VC++中的文件操作
- FAQ_BREW MP
- poj 1686 Lazy Math Instructor (字符串)
- 今天是开博客的第一天
- JAVA基础--JAVA中的反射机制详解
- swt
- 四阶巴特沃兹低通滤波器的设计与仿真
- WinForm票据套打重定位