编译pwlib和openh323设置过程

编译pwlibopenh323设置过程:

www.openh323.org下载pwlib_1.5.2openh323_1.12.2

操作平台:Win2000+VC6

1 先是将下载的两个文件解压到c:\目录下

c:\pwlib c:\openh323

2 打开vc6 之后 tools中的options中的directories

选择'Include files'之后 加入

C:\PWLib\Include\PwLib\MSWIN
C:\PWLib\Include\PtLib\MSOS
C:\PWLib\Include
C:\OpenH323\Include

3 tools中的options中的directories中,分别选择'Lib files'”Executable Files”,添加:

C:\PWLib\Lib
C:\OpenH323\Lib

4 系统的 PATH 环境变量里(在设置\控制面板\系统 \高级\环境变量\系统变量\path)添加下面路径

C:\PWLib\Lib
C:\OpenH323\Lib

5 创建pwlib/include/ptbuildopts.h文件(拷贝pwlib/include/目录下ptbuildopts.h.in,重命名一下即可)

6 ) 没有openssl 就没有做这一步(可选有带扩充)

7 openh323.org下载flexbison解压到c:\下面。

flexbison里面的说明中有

Put c:\tools in your executable PATH.(这里的executable PATHvctools下面options选择directories 中选择 Executable files中添加c:\tools

最后把这个文件路径c:\tools添加到系统环境变量path里去

8 In VisualStudio v5/6 use the Batch Build command and build the "ASNParser - Win32 Release",  "pwtest - Win32 Release" and "pwtest - Win32 Debug" targets. make sure all other targets are not checked. Also make sure you have not checked the "Selection Only" check box.不要选择"Selection Only" check box

进行编译的时候:

编译中会出错,主要是pwlib\src\ptlib\common\vfakeio.cxx中,有很多个 '?’少了半个单引号,加上就可以了)
至此,Pwlib编译完成。

下面进行openh323库的编译:

1 在将pwlib编译好之后 ,不要将中间文件清楚,否则将会影响到下面的openh323的编译。若将中间文件清除的话,asnparser将无法定位到ptlib.dll

2 另外还需将openh323中的config.exe换成高版本中的config.exe(openh323_1.17中的config.exe)

3 openh323下的include目录中建立openh323buildopts.h文件(只需复制include目录中的openh323buildopts.h.in并重命名即可)

4 如果openh323\ src文件夹下面有三个.dtf文件,将其删除

5 进行编译工作,即可完成。

编译过程中易出现的问题:

1 The following error:

Linking...
LINK : fatal error LNK1181: cannot open input file "ptlib.lib"
Error executing link.exe.

You have not set the MSVC library paths correctly (Tools->Options->Directories).

2 The following error:

Performing Custom Build Step on ..\common\getdate.y
The name specified is not recognized as an
internal or external command, operable program or batch file.
Error executing c:\winnt\system32\cmd.exe.

You have not installed bison and flex correctly. Check that they are named bison.exe and flex.exe and the directory they are in is in the PATH environment variable. it may also be necessary to add this directory to the MSVC executable path (Tools->Options->Directories).

3 为什么在编译好pwlib之后,来编译openh323会出现这样的问题?

--------------------Configuration: OpenH323Lib - Win32 Release--------------------

Configuring Build Options

Invalid keyboard code specified

This program cannot be run in DOS mode.

Error executing c:\winnt\system32\cmd.exe.

simple.exe - 1 error(s), 0 warning(s)

原因:在将pwlib编译好之后 ,不要将中间文件清楚,这个将影响下面的openh323的编译,若将中间文件清除的话,asnparser将无法定位到ptlib.dll

4 在编译OpenH323dll - Win32 Release时弹出对话框 MergeSym.exe 应用程序错误

--------------------Configuration: OpenH323dll - Win32 Release--------------------

Merging exported library symbols

MergeSym version 1.2.1 on Windows 2000 by Equivalence

Compiling resources...

Compiling...

dllmain.cxx

Linking...

   Creating library lib/OpenH323.lib and object lib/OpenH323.exp

OpenH323.exp : error LNK2001: unresolved external symbol "public: __thiscall H235AuthProcedure1::H235AuthProcedure1(void)" (??0H235AuthProcedure1@@QAE@XZ)

 

解决办法:将openh323下面的src文件夹下面的三个.dtf文件删除

基于openh323协议栈的应用程序的编译:

1 opengk:

编译成功的opengk以普通方式运行可以在运行窗口或者dos下键入opengk debug

    然后会出来一个窗口,在菜单里头可以选择install>然后就会安装成系统的服务。

    然后可以启动或者停止服务的形式来启动或者停止程序。

    安装服务,启动服务,停止服务,卸载服务等都可以通过菜单或者命令来执行。分别是 opengk install,opengk start,opengk stop,opengk uninstall    dos下键入opengk --help可以看到帮助

     配置,可以通过浏览器浏览本机的1719端口进行web配置http://localhost:1719

     debug模式下运行的control菜单即可弹出上述web管理界面。

posted on 2007-03-27 13:05  yerlu  阅读(1080)  评论(0)    收藏  举报