如何使用Botan Amalgamation文件和VS2008 [英] How to use Botan Amalgamation files and VS2008

查看:298
本文介绍了如何使用Botan Amalgamation文件和VS2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • 清除安装Windows XP SP3

  • 安装Python 2.7.2

  • 将Botan 1.10.1解压缩到桌面

  • 执行 configure.py --cc = msvc --disable-shared --gen-amalgamation

  • 复制 botan_all.h botan_all.cpp 到我的开发工作站

  • 在VS2008中创建一个新项目Win32控制台项目



这会给我102个错误...任何人都在使用这个库?

 code> #includebotan_all.h
int main(int argc,char * argv [])
{
return 0;
}


解决方案

问题是,一个windows应用程序并包括windows.h,windows.h包括最小和最大的宏。



解决方案是定义#define NOMINMAX
你可以做项目的属性页面> C / C ++>预处理程序>预处理程序定义



此外,在botan_all.h中添加#define BOTAN_DLL以避免至少在版本1.10.1中出现错误


  • Clean install of Windows XP SP3
  • Install Python 2.7.2
  • Extract Botan 1.10.1 to the desktop
  • Run configure.py --cc=msvc --disable-shared --gen-amalgamation
  • Copy botan_all.h and botan_all.cpp to my dev workstation
  • Make a new project Win32 console project in VS2008

This gives me 102 errors ... anyone using this library?

#include "botan_all.h"
int main(int argc, char *argv[])  
{
    return 0;
}

解决方案

The problem is your project is a windows application and includes windows.h, windows.h includes macros for min and max.

The solution is to define #define NOMINMAX You can do through the project's property pages > C/C++ > Preprocessor > Preprocessor definitions

Also, add #define BOTAN_DLL in botan_all.h to avoid error at least in version 1.10.1

这篇关于如何使用Botan Amalgamation文件和VS2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆