没法FQ的可以看看, 网上有编译好的, 但不适合自己的项目, 只能自己编译

编译方法原文

 summary OpenPGM 5 : C Reference : Build Library : MSVC 2010 on Windows 7

labels Phase-Implementation

sidebar TOC5CReferenceProgrammersChecklist

Building with MSVC 2010 for Windows 7

First install Microsoft Visual C++ 2010 Express, Professional (x64 support), etc. Install the build system CMake and the PGM build dependencies Perl and Python 2.7.

Checkout the repository as per the Subversion guide, or download the latest source archive and extract. You can use Cygwin and Subversion to checkout the source.

$ *cd /cygdrive/c *

$ *svn checkout http://openpgm.googlecode.com/svn/tags/release-5-1-102 

 libpgm-5.1.102 *

Configure using a Visual Studio Command Prompt.

C:\> *cd \libpgm-5.1.102\openpgm\pgm*

C:\libpgm-5.1.102\openpgm\pgm> *mkdir build*

C:\libpgm-5.1.102\openpgm\pgm> *cd build*

C:\libpgm-5.1.102\openpgm\pgm\build> *cmake ..*

CMake will build a Makefile in the current directory with the PGM library to be built in the sub-directory lib.

To configure the release version use the following command or change the parameter using cmake-gui.

C:\libpgm-5.1.102\openpgm\pgm\build> *cmake -DCMAKE_BUILD_TYPE=Release ..*

Build.

C:\libpgm-5.1.102\openpgm\pgm\build> *nmake*

If you want a redistributable installer use CPack to build the package.

C:\libpgm-5.1.102\openpgm\pgm\build> *nmake package*
 
--------------------------------------------------------------------------------------------------------------------------------------------------
CMAKE可以指定VS版本, 不一定是2010
 
CMAKE产生项目文件后就可以在生成目录下找到SLN工程文件, 可以在VS中编译, 不一定要用命令行编译

编译时需要用到GetGnuWin中的patch.exe, GetGnuWin路径需要加到PATH环境变量中

其他项目引用时, 需要拷贝include\pgm整个文件夹, 不能只拷贝pgm.h
posted on 2017-09-01 18:55  ge ge wu  阅读(707)  评论(0编辑  收藏  举报