Build SWIG with Microsoft Visual C++ 2008 Express
2008-01-07 10:13
976 查看
"SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is used with different types of languages including common scripting languages such as Perl, PHP, Python, Tcl and Ruby".
Building SWIG on Windows is not a hard work. The official documenation shows out at least two ways for you. But, these two ways have additional prerequisites. Either MinGW and MSYS or Cywin are required to be installed. As it said, "If you don't want to install Cygwin or MinGW, use a different compiler to build SWIG. For example, all the source code files can be added to a Visual C++ project file in order to build swig.exe from the Visual C++ IDE".
Just follow this instruction, you will get lots of errors complaining no swigconfig.h found. To solve this issue, copy the file
%SWIGDIR%/Source/Include/swigconfig.in
to
%SWIGDIR%/Source/Include/swigconfig.h.
Then, let's make some modification to this newly copied file as below: Now, you can build swig.exe successfully (Oh, do remember to add all the subfolders to additional include search path before compilation).
#define HAVE_BOOL 1
#define SWIG_LIB ""
#define PACKAGE_VERSION "1.3.33"
#define SWIG_CXX "Microsoft Visual C++ 2008 Express"
#define SWIG_PLATFORM "Windows Server 2003"
#define PACKAGE_BUGREPORT "http://"
#define SWIG_LIB_WIN_UNIX "Lib"
Building SWIG on Windows is not a hard work. The official documenation shows out at least two ways for you. But, these two ways have additional prerequisites. Either MinGW and MSYS or Cywin are required to be installed. As it said, "If you don't want to install Cygwin or MinGW, use a different compiler to build SWIG. For example, all the source code files can be added to a Visual C++ project file in order to build swig.exe from the Visual C++ IDE".
Just follow this instruction, you will get lots of errors complaining no swigconfig.h found. To solve this issue, copy the file
%SWIGDIR%/Source/Include/swigconfig.in
to
%SWIGDIR%/Source/Include/swigconfig.h.
Then, let's make some modification to this newly copied file as below: Now, you can build swig.exe successfully (Oh, do remember to add all the subfolders to additional include search path before compilation).
#define HAVE_BOOL 1
#define SWIG_LIB ""
#define PACKAGE_VERSION "1.3.33"
#define SWIG_CXX "Microsoft Visual C++ 2008 Express"
#define SWIG_PLATFORM "Windows Server 2003"
#define PACKAGE_BUGREPORT "http://"
#define SWIG_LIB_WIN_UNIX "Lib"
相关文章推荐
- error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
- Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools"
- error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools"
- Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK
- pip 安装模块时出现error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools":
- error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
- OpenCV with Visual C++ 6.0, 2005 Express, and 2008 Express
- Programming Visual Basic 2008: Build .NET 3.5 Applications with Microsoft's RAD Tool for Business
- error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http:/
- 安装scrapy报错 error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
- error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http:/
- Scrapy安装报error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools
- Microsoft Visual C++ 2008 发布程序的部署问题
- Setting up NUnit for C# Unit Testing with Visual Studio C# Express 2008
- wxWidgets-2.6.2 + Microsoft Visual C++ 2005 Express + Platform SDK 安装使用手记
- pip install 时提示:error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Buil
- How to Compile XviD with Microsoft Visual C++ 6.0(zhuan)
- Coding Faster-Getting More Productive with Microsoft Visual Studio: Covers Microsoft Visual Studio 2005, 2008, and 2010
- FATAL: Payload 'Microsoft Visual C++ 2008 Redistributable Package (x86) 7.0.0.103 {9C4AA28F-AC6B-11E
- 初试安装Microsoft SQL 2008 Server Express Edition With Tools