⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 non-unix-use

📁 Ubuntu packages of security software。 相当不错的源码
💻
📖 第 1 页 / 共 2 页
字号:
The Cygwin home page (http://www.cygwin.com/) says this:  Cygwin is a Linux-like environment for Windows. It consists of two parts:  . A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing    substantial Linux API functionality  . A collection of tools which provide Linux look and feel.  The Cygwin DLL currently works with all recent, commercially released x86 32  bit and 64 bit versions of Windows, with the exception of Windows CE.On both MinGW and Cygwin, PCRE should build correctly using:  ./configure && make && make installThis should create two libraries called libpcre and libpcreposix, and, if youhave enabled building the C++ wrapper, a third one called libpcrecpp. These areindependent libraries: when you like with libpcreposix or libpcrecpp you mustalso link with libpcre, which contains the basic functions. (Some earlierreleases of PCRE included the basic libpcre functions in libpcreposix. This nolonger happens.)If you want to statically link your program against a non-dll .a file, you mustdefine PCRE_STATIC before including pcre.h, otherwise the pcre_malloc() andpcre_free() exported functions will be declared __declspec(dllimport), withunwanted results.Using Cygwin's compiler generates libraries and executables that depend oncygwin1.dll. If a library that is generated this way is distributed,cygwin1.dll has to be distributed as well. Since cygwin1.dll is under the GPLlicence, this forces not only PCRE to be under the GPL, but also the entireapplication. A distributor who wants to keep their own code proprietary mustpurchase an appropriate Cygwin licence.MinGW has no such restrictions. The MinGW compiler generates a library orexecutable that can run standalone on Windows without any third party dll orlicensing issues.But there is more complication:If a Cygwin user uses the -mno-cygwin Cygwin gcc flag, what that really does isto tell Cygwin's gcc to use the MinGW gcc. Cygwin's gcc is only acting as afront end to MinGW's gcc (if you install Cygwin's gcc, you get both Cygwin'sgcc and MinGW's gcc). So, a user can:. Build native binaries by using MinGW or by getting Cygwin and using  -mno-cygwin.. Build binaries that depend on cygwin1.dll by using Cygwin with the normal  compiler flags.The test files that are supplied with PCRE are in Unix format, with LFcharacters as line terminators. It may be necessary to change the lineterminators in order to get some of the tests to work. We hope to improvethings in this area in future.BUILDING PCRE WITH CMAKECMake is an alternative build facility that can be used instead of thetraditional Unix "configure". CMake version 2.4.7 supports Borland makefiles,MinGW makefiles, MSYS makefiles, NMake makefiles, UNIX makefiles, Visual Studio6, Visual Studio 7, Visual Studio 8, and Watcom W8. The following instructionswere contributed by a PCRE user.1. Download CMake 2.4.7 or above from http://www.cmake.org/, install and ensure   that cmake\bin is on your path.2. Unzip (retaining folder structure) the PCRE source tree into a source   directory such as C:\pcre.3. Create a new, empty build directory: C:\pcre\build\4. Run CMakeSetup from the Shell envirornment of your build tool, e.g., Msys   for Msys/MinGW or Visual Studio Command Prompt for VC/VC++5. Enter C:\pcre\pcre-xx and C:\pcre\build for the source and build   directories, respectively6. Hit the "Configure" button.7. Select the particular IDE / build tool that you are using (Visual Studio,   MSYS makefiles, MinGW makefiles, etc.)8. The GUI will then list several configuration options. This is where you can   enable UTF-8 support, etc.9. Hit "Configure" again. The adjacent "OK" button should now be active.10. Hit "OK".11. The build directory should now contain a usable build system, be it a    solution file for Visual Studio, makefiles for MinGW, etc.Testing with RunTest.bat1. Copy RunTest.bat into the directory where pcretest.exe has been created.2. Edit RunTest.bat and insert a line that indentifies the relative location of   the pcre source, e.g.:   set srcdir=..\pcre-7.4-RC33. Run RunTest.bat from a command shell environment. Test outputs will   automatically be compared to expected results, and discrepancies will   identified in the console output.4. To test pcrecpp, run pcrecpp_unittest.exe, pcre_stringpiece_unittest.exe and   pcre_scanner_unittest.exe.BUILDING UNDER WINDOWS WITH BCC5.5Michael Roy sent these comments about building PCRE under Windows with BCC5.5:  Some of the core BCC libraries have a version of PCRE from 1998 built in,  which can lead to pcre_exec() giving an erroneous PCRE_ERROR_NULL from a  version mismatch. I'm including an easy workaround below, if you'd like to  include it in the non-unix instructions:  When linking a project with BCC5.5, pcre.lib must be included before any of  the libraries cw32.lib, cw32i.lib, cw32mt.lib, and cw32mti.lib on the command  line.BUILDING PCRE ON OPENVMSDan Mooney sent the following comments about building PCRE on OpenVMS. Theyrelate to an older version of PCRE that used fewer source files, so the exactcommands will need changing. See the current list of source files above."It was quite easy to compile and link the library. I don't have a formalmake file but the attached file [reproduced below] contains the OpenVMS DCLcommands I used to build the library. I had to add #definePOSIX_MALLOC_THRESHOLD 10 to pcre.h since it was not defined anywhere.The library was built on:O/S: HP OpenVMS v7.3-1Compiler: Compaq C v6.5-001-48BCDLinker: vA13-01The test results did not match 100% due to the issues you mention in yourdocumentation regarding isprint(), iscntrl(), isgraph() and ispunct(). Imodified some of the character tables temporarily and was able to get theresults to match. Tests using the fr locale did not match since I don't havethat locale loaded. The study size was always reported to be 3 less than thevalue in the standard test output files."=========================$! This DCL procedure builds PCRE on OpenVMS$!$! I followed the instructions in the non-unix-use file in the distribution.$!$ COMPILE == "CC/LIST/NOMEMBER_ALIGNMENT/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES$ COMPILE DFTABLES.C$ LINK/EXE=DFTABLES.EXE DFTABLES.OBJ$ RUN DFTABLES.EXE/OUTPUT=CHARTABLES.C$ COMPILE MAKETABLES.C$ COMPILE GET.C$ COMPILE STUDY.C$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol$! did not seem to be defined anywhere.$! I edited pcre.h and added #DEFINE SUPPORT_UTF8 to enable UTF8 support.$ COMPILE PCRE.C$ LIB/CREATE PCRE MAKETABLES.OBJ, GET.OBJ, STUDY.OBJ, PCRE.OBJ$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol$! did not seem to be defined anywhere.$ COMPILE PCREPOSIX.C$ LIB/CREATE PCREPOSIX PCREPOSIX.OBJ$ COMPILE PCRETEST.C$ LINK/EXE=PCRETEST.EXE PCRETEST.OBJ, PCRE/LIB, PCREPOSIX/LIB$! C programs that want access to command line arguments must be$! defined as a symbol$ PCRETEST :== "$ SYS$ROADSUSERS:[DMOONEY.REGEXP]PCRETEST.EXE"$! Arguments must be enclosed in quotes.$ PCRETEST "-C"$! Test results:$!$!   The test results did not match 100%. The functions isprint(), iscntrl(),$!   isgraph() and ispunct() on OpenVMS must not produce the same results$!   as the system that built the test output files provided with the$!   distribution.$!$!   The study size did not match and was always 3 less on OpenVMS.$!$!   Locale could not be set to fr$!=========================Last Updated: 21 September 2007****

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -