How to compile pwlib1_12_0/openh323 2_4_0 in msvc6

Source: Internet
Author: User

1. Download pwlib.zip and openh323.zip from http://www.openh323.org/code.html;

Or a http://sourceforge.net/project/showfiles.php? Group_id = 80674
2. Expand pwlib.zip unzip openh323.zip to the E:/h323/source/pwlib and E:/h323/source/openh323 directories respectively;
3. Start msvc6, tools | options | directories to include files in the following order:
E:/h323/source/pwlib/include/pwlib/mswin
E:/h323/source/pwlib/include/ptlib/MSOs
E:/h323/source/pwlib/include
E:/h323/source/openh323/include
[Note: The order must not be wrong]
Add the following three lines to the library files and executable files paths.
C:/tools
E:/h323/source/pwlib/lib
E:/h323/source/openh323/lib
Add the preceding three rows to the system's path environment variable (in Settings | Control Panel | system | advanced | environment variable | system variable | path ).

4. if you need bison and flex for compilation, you can download the keys (it must be a C drive, and confirm that flex.exeand bison.exe are in the C:/tools directory. hairy and bison. simple is in the C:/tools/share directory;
5. In the http://www.ebao.biz/down/Configure.rar, download and decompress to E:/h323/source/pwlib/tools directory; the high version has integrated Configure. DSP
6. open pwlib In the first-level directory of pwlib. DSW. If you are prompted to ask about config. DSP, select Config In the configure directory under directory e:/h323/source/pwlib/tools. DSP;
7. Compile the configure project in the build list first;
8. Copy configure.exe to E:/h323/resource/pwlib/tools/configure/releasedirectory in E:/h323/source/pwlib and E:/h323/source/openh323directory. The latest version has configure.exe, which does not need to be copied.

9. Compile
Error message:
1> D:/Microsoft Visual Studio 8/VC/platformsdk/include/winnt. H (222): Error c2146: syntax error: Missing '; 'before identifier' pvoid64'
1> D:/Microsoft Visual Studio 8/VC/platformsdk/include/winnt. H (222): Error c4430: Missing type specifier-int assumed. note: C ++ does not support

Default-int
1> D:/Microsoft Visual Studio 8/VC/platformsdk/include/winnt. H (5940): Error c2146: syntax error: Missing '; 'before identifier 'buffer'
1> D:/Microsoft Visual Studio 8/VC/platformsdk/include/winnt. H (5940): Error c4430: Missing type specifier-int assumed. note: C ++ does not support

Default-int
1> D:/Microsoft Visual Studio 8/VC/platformsdk/include/winnt. H (5940): Error c4430: Missing type specifier-int assumed. note: C ++ does not support

Default-int

 

Solution to the first type of problem: the error occurs in operator = (long); function definition, because in vc6, if the specified return value type is not displayed, the compiler regards it as the default integer, but vs2005 does not support the default integer.

To solve this problem, you can use wd4430 to solve it; add/wd4430 to C ++/command line in the project options.

2. Choose tools> Options> projects and solutions> VC ++ directories> show directories for and select include files.
Then add
D:/dx90sdk/include
D:/dx90sdk/samples/C ++/DirectShow/baseclasses
D:/dx90sdk/samples/C ++/common
The problem may remain. Adjust the order of include files and put them all at the end, for example, my environment:
$ (Vcinstalldir) include
$ (Vcinstalldir) atlmfc/include
$ (Vcinstalldir) platformsdk/include
$ (Frameworksdkdir) include
D:/dx90sdk/include
D:/dx90sdk/samples/C ++/DirectShow/baseclasses
D:/dx90sdk/samples/C ++/common
Then the contents in project> baseclasses Properties> Configuration> C/C ++> General> additional include directories (.,.. /.. /.. /.. /include) Delete and recompile

, Pvoid64 error disappears for the following reasons:
Pointer_64 is a macro that works under 64-bit compilation. It contains the basetsd In the SDK directory. H (Microsoft Visual Studio 8/VC/platformsdk/include/basetsd. H (23): # define

Pointer_64 _ ptr64), but dxsdk also carries a basetsd. H, which does not define pointer_64, which leads to an error. You only need to change the priority of include files. Of course, you can also rewrite winnt. h.

In the following two lines: typedef void * pvoid;
Typedef void * pointer_64 pvoid64;
Add a row before:
# Define pointer_64 _ ptr64

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/zblue78/archive/2009/02/14/3889313.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.