Posted on 2008-11-27 02:50
chefZ 阅读(436)
评论(0) 编辑 收藏 引用
1. change configure to configure.bat in Console_2005.vcproj
2. edit configure.bat to add options, and, at the end add %1 %2
3. edit include/ptbuildoptions.h.in, change to
#if defined(_MSC_VER) && P_EXPAT
#ifdef P_WINEXPAT
#pragma include_alias(<expat.h>, <@WINEXPAT_DIR@/source/lib/expat.h>)
#define P_EXPAT_LIBRARY "@WINEXPAT_DIR@/bin/libexpat.lib"
#else
...
configure.ac 中也須要改, 建自己的 configure.bat 或修改 configure.cpp. When modify configure.ac, all lines started with dnl
mean for windows platform, changes need o be made for them. All
directories or paths are relative not absolute. If you change anything
before , you need to change configure.cpp accordingly. Finally, edit ptbuildopts.h.in to match with your changes.
4. src/ptlib/msdos/PTLib_2005.vcproj
change MergeSym to $(ProjectDir)../../../lib/MergeSym
5. tools/MergeSym/MergeSym.vcproj
change post-build to copy $(ProjectDir)$(ConfigurationName)\mergesym.exe ..\..\lib > nul
Example:
configure --no-search --winexpat-dir=C:\Expat --winssl-dir=c:/openssl --wsslaes-dir=c:/openssl --libsdl-dir=c:/sdl %1 %2
When finish the above. Open vs2005, load ptlib_samples_2005.sln. This
will automatically build everything (ptlib + samples) for you. It's
better than using plib_2005.sln. 老外作事就是一板一眼。
If you want to use other libraries other than the ones suggested in the
document, you need to do it in PTLib project, e.g. use your own copy of
expat lib or ssl lib or ...... And, make sure to check the samples code
output messages inside vs2005 to make sure the correct lib(s) or dll(s)
is(are) loaded.