openh323编译注意事项

 

1、首先先在官方网站下载PWLib DLL libraries、OpenH323 DLL libraries、PWLib源代码、OpenH323源代码。
2、http://www.voxgratia.org/bin/flexbison.zip下载flexbison.zip用于GNU bison(GNU bison工具是编译PWLib所必须的.而GNU flex 并不是所有的人需要)解压这2个预编译工具在"C:/"下(或者你选择的目录),这样就会创建"C:/Tools"这个目录,并在这个目录下有"FLEX.EXE"和"BISON.EXE"两个文件,并在"C:/TOOLS/SHARE"目录下有"BISON.SIMPLE"和"BISON.HAIRY".

3、检查VC头文件
在VC6.0中对STL支持的头文件有许多缺陷。这些缺陷对那些依赖于全局静态变量的正确行为的程序是足以致命的。幸运的是,STL的作者为MSVC新发布的文件正确的解决了大多数的问题。如果你的机器中没有找到这个,你可以从http://www.voxgratia.org/releases/msvc6chk.zip这里下载。然后用命令" msvc6chk upgrad"运行msvc6chk程序。

4、配制目录
从"Tool"菜单中选择"Option",然后按下面的要求设置目录:
        将installDir/PWlib/LIB加入Executable directory
        将installDir/openh323/lib/加入Executable directory
        将installDir/tools/加入Executable directory

 将insallDir/PWLIB/INCLUDE/PWLIB/MSWIN加入Include directory
 将insallDir/PWLIB/INCLUDE/PTLIB/MSOS加入Include directory   (注意添加顺序)
 将insallDir/PWLib/include加入Include directory
 将insallDir/openh323/include加入Include directory

 将installDir/PWlib/LIB加入Library directory
     将installDir/openh323/lib/加入Library directory
       
      在系统的Path环境变量中添加installDir/tools; installDir/PWlib/LIB;  installDir/openh323/LIB;

 5、首先编译PWLIB工程。
       在include目录下面将ptbuildopts.h.in Copy后粘贴,然后改名ptbuildopts.h;
       批量编译以下三个工程:ASNParser - Win32 Release",  "pwtest - Win32 Release"和"pwtest - Win32 Debug"

        编译时候会出现很多Error的,很好解决:定位到出错地方,加上几个' 单引号就可以了

 6、编译完成后再编译openh323工程
        要下到最新版本的源代码,然后把里面的openh323/configure.exe替换掉就可以了!
        把openh323buildopts.h这个文件从你的工程中删掉。
        然后一次编译"OpenH323Lib files", "OpenH323dll files"等。

        成功即可,剩下可以下载h323客户端,进行编译,

 


常见错误:
1、
编译时报错如下:
g:/lxpdata/ip_phone/src/openh323/pwlib_1.5.2/pwlib/include/ptlib/object.h(585) : error C2146: syntax error : missing ';' before identifier 'CanTrace'
g:/lxpdata/ip_phone/src/openh323/pwlib_1.5.2/pwlib/include/ptlib/object.h(798) : error C2146: syntax error : missing ';' before

解决:
这是vc 环境中include 设置有顺造成的,正确的请参考:
./PWLib/Include/PwLib/MSWIN
./PWLib/Include/PtLib/MSOS
./PWLib/Include


2、
编译时报错:
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)

解决:
<1>、下载flexbison,在官方网站www.openh323.org 上是可以下到的;解压到C盘根目录下面;
<2>、设置好系统的Path环境变量(在设置/控制面板/系统 /高级/环境变量/系统变量/path),添加以下路径;
c:/tools
C:/PWLib/Lib
C:/OpenH323/Lib

<3>、在include目录下面将ptbuildopts.h.in Copy后粘贴,然后改名ptbuildopts.h;
<4>、批量编译以下三个工程:ASNParser - Win32 Release",  "pwtest - Win32 Release"和"pwtest - Win32 Debug"

 

 

 

 


 

你可能感兴趣的:(dll,Path,工具,include,library,keyboard)