Summary of compiling pwlib1.12 in Visual Studio 6.0

Source: Internet
Author: User
Tags openssl windows ftp protocol
Visual Studio 6.0 Compile Pwlib Summary 1. My Environment
 
Visual Studio 6.0 Visual Studio. NET 2010 Microsoft platform SDK for Windows Server 2003 r2microsoft sdksmicrosoft DirectX 9.0 sdkmingw

2. Note

Be sure to read the http://www.cnblogs.com/yedaoq/archive/2011/02/22/1960866.html before trying to compile. This article only involves some issues that I encountered in my compilation environment and are not included in the official compilation instructions.

3. Project changes and compilation Sequence

In the official documentation, the mentioned compilation sequence is: Console , Console Components , Pwlib . However, in the latest version ( 1.12 ) Pwlib Is no longer included Console Components Project. The official explanation is to simplify Windows Manage the files in the sub-database and UNIX Always consistent. Console Components Add all source files Console The project is in progress.

 

According to my observation, the file in installdir \ pwlib \ SRC \ ptclib should be the original Console Components Project content, and Installdir \ pwlib \ SRC \ ptlib is the original Console Project content. The reason is: according to the official documentation, Console components is an additionalPwlib Feature Engineering. These features depend on specific other libraries and SDK . Because my machine exists Platform SDK , DirectX SDK , These SDK Includes Direct Sound, IPv6, and so on. Console During compilation, you must manually Add some files in installdir \ pwlib \ SRC \ ptclib Console Engineering. In my opinion, the functions of these files comply with the definition of "Features. So I guess the original Console Components Files are stored in Installdir \ pwlib \ SRC \ ptclib directory. Of course, this is just speculation.

 

New Version Pwlib The compilation sequence is Console , Mergesym , Pwlib , Mergesym Is a new project. Official FAQ Some statements about this project: Pwlib and openh323 try to maintain DLL Consistency of the number of the entry point, Mergesym ProgramWill compare DLL Function signature and . DTF Entries listed in the file, and ensure that the final file ends with a compatible serial number.

3. Include , Lib Directory order

Pwlib Includes _ Crtreportblocktype. the header file is Crtdbg. h . However Vc6 Tape Crtdbg. h Does not include this function, while Platform SDK Tape Crtdbg. h . Therefore Platform SDK The directory should be in Vc6 Directory.

In addition,PwlibBuilt-inWinCEAndWmPlatform header files. In the previous compilation process, these header files have an impact. Therefore, we recommend that youPwlibDirectoryIncludeDirectory. In addition, I think you can try to remove these header files.Installdir \ pwlib \ include \ ptlib \ wince and installdir \ pwlib \ include \ ptlib \ Wm.

4. Console Compilation problems

Error message:

Microsoft platform SDK for Windows Server 2003 R2 \ SDK \ include \ wspiapi. H (47): Error c2265: '': Reference to a zero-sized array is illegal

Solution:

Wspiapi. hHeader file headerAdd statement: # DEFINE _ wspiapi_countof

 

Error message:

Fatal error c1083: cannot open source file: '. \ podbc. cxx': no such file or directory

Solution:

The file location is incorrect. The actual location isInstalldir \ pwlib \ SRC \ ptclibMedium.

 

Error message:

G: \ Open Source \ ptlib \ SRC \ ptlib \ common \ videoio. cxx (567): Error c2059: syntax error: '}' G: \ Open Source \ ptlib \ SRC \ ptlib \ common \ videoio. cxx (568): Error c2143: syntax error: Missing '; 'before '}'

Solution:

SizetableThe last sub-structure of the table is not defined.Content (that is, use the default member value ). HoweverVCCannot be compiled,The statement should be changed:{Null, 0, 0}.

5. mergesym Compilation problems

MergesymIn the compilation process, the link issue usually occurs. There are two solutions:

 

First, delete. DTF File. As mentioned earlier, Mergesym Yes . DTF File to maintain DLL Compatibility of entry number. Default DTF The file contains a list of entry points when all features are enabled, that is, the most complete list. If some features are not enabled Mergesym The comparison process will fail. We recommend that you delete all . DTF File. These files are stored in Installdir \ pwlib \ include \ ptlib \ MSOs.

 

When some features are enabledConsoleAdd additional files to the project. OtherwiseMergesymAn error occurred while returning the link.ConsoleDuring compilation,ConfigureThe program scans all hard drive, finds the library, and determines which features are enabled based on this. The following is the installationPlatform SDKAndVc6Feature loading:

 

Located DNS resolver at F: \ Program Files \ Microsoft platform SDK for Windows Server 2003 R2 \ located IPv6 support at F: \ Program Files \ Microsoft platform SDK for Windows Server 2003 R2 \ include \ located QoS support at F: \ Program Files \ Microsoft platform SDK for Windows Server 2003 R2 \ include \ located ODBC support at F: \ Program Files \ Microsoft platform SDK for Windows Server 2003 R2 \ include \ located direct sound support at F: \ Program Files \ Microsoft Visual Studio \ vc98 \ features: version enabled byte order enabled semaphore support enabled plugin support enabled DNS resolver enabled Cyrus SASL disabled open LDAP disabled due to absence of feature SASL Open SSL disabled Open ssl aes disabled due to absence of feature OpenSSL windows open SSL disabled windows open ssl aes disabled due to absence of feature winssl expat XML disabled windows expat XML disabled VXML disabled due to absence of feature expat | winexpat jabber disabled due to absence of feature expat | winexpat XMLRPC disabled due to absence of feature expat | winexpat soap disabled due to absence of feature expat | winexpat Speech API disabled IPv6 support enabled QoS support enabled Simple DirectMedia Layer disabled video support enabled Asn support enabled stun support enabled Pipe Channel support enabled DTMF encoding/decoding support enabled WAV file support enabled SOCKS protocol support enabled FTP protocol support enabled SNMP protocol support enabled telnet protocol support enabled remote connection support enabled serial support enabled POP3/SMTP support enabled HTTP service support enabled config file protocol support enabled socket aggregation support enabled video file support enabled sound support enabled direct sound support enabled ODBC support enabled

 

If these features are enabledConsoleAdd at least the following files to the project:Delaychan in the installdir \ pwlib \ SRC \ ptclib directory. cxx, HTTP. cxx, pvfiledev. cxx, pvidfile. cxx, pwavfile. cxx, pwavfiledev. cxx and installdir \ pwlib \ SRC \ ptlib \ commonInPglobalstatic. cxx.

To prevent configureYou can edit the environment variables by scanning certain locations to avoid enabling certain features:Msvc_pwlib_configure_exclude_dirsOrPwlib_configure_exclude_dirs.

 

6. pwlib Compilation problems

Error message:

Microsoft Visual Studio \ vc98 \ include \ d3dtypes. H (14): Fatal error c1083: cannot open include file: 'subwtype. H': no such file or directory

Solution:

AddWin32Macro definition, which can be addedDllmain. cxx. For example:# Define Win32 1

 

Error message:

Link: Fatal error lnk1181: cannot open input file "ptclib. lib"

Solution:

Previously mentionedConsole Components Merge projects Console So Pwlib The project does not need to be depended on any more. Ptclib. Lib ( Console Components ). Open Pwlib Project property box -> Link Page -> Object/library modules , Replace Remove ptclib. Lib.

 

Error message:

Fatal error lnk1202: "ptlib. PDB" is missing debugging information for referencing Module

Solution:

Set installdir \ pwlib \ LibDelete the folder and recompile all projects.

 

 

Related Article

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.