1251875Speter<HTML> 2251875Speter<HEAD><TITLE>APR Win32 Builds and Debugging</TITLE></HEAD> 3251875Speter<BODY> 4251875Speter<h1>APR Win32 Builds and Debugging</h1> 5251875Speter 6251875Speter<h2>Configuration and Flavors</h2> 7251875Speter 8251875Speter<p>The Win32 APR Developer Studio projects consist of</p> 9251875Speter 10251875Speter<dl> 11251875Speter <dt>apr/apr.dsp</dt> 12251875Speter <dd>Builds the static apr.lib library (-D APR_DECLARE_STATIC)</dd> 13251875Speter <dt>apr/libapr.dsp</dt> 14251875Speter <dd>Builds the dynamic libapr.dll library (no define required)</dd> 15251875Speter <dt>apr-util/aprutil.dsp</dt> 16251875Speter <dd>Builds the static aprutil.lib library (-D APU_DECLARE_STATIC)</dd> 17251875Speter <dt>apr-util/libaprutil.dsp</dt> 18251875Speter <dd>Builds the dynamic libaprutil.dll library (no define required)</dd> 19251875Speter <dt>apr-iconv/apriconv.dsp</dt> 20251875Speter <dd>Builds the static apriconv.lib library (-D API_DECLARE_STATIC)</dd> 21251875Speter <dt>apr-iconv/libapriconv.dsp</dt> 22251875Speter <dd>Builds the dynamic libapriconv.dll library (no define required)</dd> 23251875Speter</dl> 24251875Speter 25251875Speter<p>In order to prepare to use one of the <em>static</em> libraries above, 26251875Speter your application must be compiled with the define shown above, so that the 27251875Speter correct linkage is created. The APR authors intended the use of dynamic 28251875Speter libraries by default, so application authors do not need any special 29251875Speter defines in order to link to the dynamic library flavors.</p> 30251875Speter 31251875Speter<p>In order to build APR, you must use the proper dependencies. A good 32251875Speter example of those dependencies is given in the apr-util/aprutil.dsw 33251875Speter Developer Studio workspace. You can borrow the parts of that structure 34251875Speter your application needs, that workspace defines both the dynamic and static 35251875Speter library dependencies.</p> 36251875Speter 37251875Speter<p>The APR libraries (dynamic and static) are compiled with debugging symbols, 38251875Speter even in Release builds. The dynamic library symbols are always usable, 39251875Speter simply keep the correspond .pdb file in the same path as the library .dll. 40251875Speter (E.g. both libapr.dll and libapr.pdb should be copied to the same path.)</p> 41251875Speter 42251875Speter<p>The static symbols will only be fully usable if your application does <em>not<em> 43251875Speter link with the /pdbtype:sept flag! At the time your application links to 44251875Speter an APR library, the corresponding _src.pdb file should exist in the original 45251875Speter path the library was built, or it may be sufficient to keep the _src.pdb file 46251875Speter in the same path as the library file. (E.g. apr.lib and apr_src.pdb should 47251875Speter reside together in your lib directory.) The later option is unconfirmed.</p> 48251875Speter 49251875Speter<p>In order to keep the symbols compiled into the static library, your application 50251875Speter must use the linker's /debug flag. If you do not want the application to be 51251875Speter debuggable with its corresponding .pdb file, omit the /debug flag and all debug 52251875Speter symbolic information is discarded. Note that your application can only be 53251875Speter debugged with the corresponding .pdb file created by the linker, unless you use 54251875Speter /debugtype:coff or /debugtype:both in your link options.</p> 55251875Speter 56251875Speter</BODY> 57251875Speter</HTML> 58