/[pcre]/code/trunk/NON-AUTOTOOLS-BUILD
ViewVC logotype

Diff of /code/trunk/NON-AUTOTOOLS-BUILD

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1320 by ph10, Wed May 1 16:39:35 2013 UTC revision 1332 by ph10, Tue May 14 14:26:37 2013 UTC
# Line 9  This document contains the following sec Line 9  This document contains the following sec
9    Building for virtual Pascal    Building for virtual Pascal
10    Stack size in Windows environments    Stack size in Windows environments
11    Linking programs in Windows environments    Linking programs in Windows environments
12      Calling conventions in Windows environments
13    Comments about Win32 builds    Comments about Win32 builds
14    Building PCRE on Windows with CMake    Building PCRE on Windows with CMake
15    Use of relative paths with CMake on Windows    Use of relative paths with CMake on Windows
16    Testing with RunTest.bat    Testing with RunTest.bat
17      Building under Windows CE with Visual Studio 200x
18    Building under Windows with BCC5.5    Building under Windows with BCC5.5
19      Building using Borland C++ Builder 2007 (CB2007) and higher
20    Building PCRE on OpenVMS    Building PCRE on OpenVMS
21    Building PCRE on Stratus OpenVOS    Building PCRE on Stratus OpenVOS
22    Building PCRE on native z/OS and z/VM    Building PCRE on native z/OS and z/VM
# Line 429  CMake build process. In the CMake GUI, t Line 432  CMake build process. In the CMake GUI, t
432    
433  USE OF RELATIVE PATHS WITH CMAKE ON WINDOWS  USE OF RELATIVE PATHS WITH CMAKE ON WINDOWS
434    
435  A PCRE user comments as follows:  A PCRE user comments as follows: I thought that others may want to know the
436    current state of CMAKE_USE_RELATIVE_PATHS support on Windows. Here it is:
437    
 I thought that others may want to know the current state of  
 CMAKE_USE_RELATIVE_PATHS support on Windows.  
   
 Here it is:  
438  -- AdditionalIncludeDirectories is only partially modified (only the  -- AdditionalIncludeDirectories is only partially modified (only the
439     first path - see below)     first path - see below)
440  -- Only some of the contained file paths are modified - shown below for  -- Only some of the contained file paths are modified - shown below for
# Line 490  To test pcrecpp, run pcrecpp_unittest.ex Line 490  To test pcrecpp, run pcrecpp_unittest.ex
490  pcre_scanner_unittest.exe.  pcre_scanner_unittest.exe.
491    
492    
 BUILDING UNDER WINDOWS WITH BCC5.5  
   
 Michael 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.  
   
   
493  BUILDING UNDER WINDOWS CE WITH VISUAL STUDIO 200x  BUILDING UNDER WINDOWS CE WITH VISUAL STUDIO 200x
494    
495  Vincent Richomme sent a zip archive of files to help with this process. They  Vincent Richomme sent a zip archive of files to help with this process. They
# Line 511  can be found in the file "pcre-vsbuild.z Line 497  can be found in the file "pcre-vsbuild.z
497  site.  site.
498    
499    
500    BUILDING UNDER WINDOWS WITH BCC5.5
501    
502    Michael Roy sent these comments about building PCRE under Windows with BCC5.5:
503    
504    Some of the core BCC libraries have a version of PCRE from 1998 built in, which
505    can lead to pcre_exec() giving an erroneous PCRE_ERROR_NULL from a version
506    mismatch. I'm including an easy workaround below, if you'd like to include it
507    in the non-unix instructions:
508    
509    When linking a project with BCC5.5, pcre.lib must be included before any of the
510    libraries cw32.lib, cw32i.lib, cw32mt.lib, and cw32mti.lib on the command line.
511    
512    
513    BUILDING USING BORLAND C++ BUILDER 2007 (CB2007) AND HIGHER
514    
515    A PCRE user sent these comments about this environment (see also the comment
516    from another user that follows them):
517    
518    The XE versions of C++ Builder come with a RegularExpressionsCore class which
519    contain a version of TPerlRegEx. However, direct use of the C PCRE library may
520    be desirable.
521    
522    The default makevp.bat, however, supplied with PCRE builds a version of PCRE
523    that is not usable with any version of C++ Builder because the compiler ships
524    with an embedded version of PCRE, version 2.01 from 1998! [See also the note
525    about BCC5.5 above.] If you want to use PCRE you'll need to rename the
526    functions (pcre_compile to pcre_compile_bcc, etc) or do as I have done and just
527    use the 16 bit versions. I'm using std::wstring everywhere anyway. Since the
528    embedded version of PCRE does not have the 16 bit function names, there is no
529    conflict.
530    
531    Building PCRE using a C++ Builder static library project file (recommended):
532    
533    1. Rename or remove pcre.h, pcreposi.h, and pcreposix.h from your C++ Builder
534    original include path.
535    
536    2. Download PCRE from pcre.org and extract to a directory.
537    
538    3. Rename pcre_chartables.c.dist to pcre_chartables.c, pcre.h.generic to
539    pcre.h, and config.h.generic to config.h.
540    
541    4. Edit pcre.h and pcre_config.c so that they include config.h.
542    
543    5. Edit config.h like so:
544    
545    Comment out the following lines:
546    #define PACKAGE "pcre"
547    #define PACKAGE_BUGREPORT ""
548    #define PACKAGE_NAME "PCRE"
549    #define PACKAGE_STRING "PCRE 8.32"
550    #define PACKAGE_TARNAME "pcre"
551    #define PACKAGE_URL ""
552    #define PACKAGE_VERSION "8.32"
553    
554    Add the following lines:
555    #ifndef SUPPORT_UTF
556    #define SUPPORT_UTF 100 // any value is fine
557    #endif
558    
559    #ifndef SUPPORT_UCP
560    #define SUPPORT_UCP 101 // any value is fine
561    #endif
562    
563    #ifndef SUPPORT_UCP
564    #define SUPPORT_PCRE16 102 // any value is fine
565    #endif
566    
567    #ifndef SUPPORT_UTF8
568    #define SUPPORT_UTF8 103 // any value is fine
569    #endif
570    
571    6. Build a C++ Builder project using the IDE. Go to File / New / Other and
572    choose Static Library. You can name it pcre.cbproj or whatever. Now set your
573    paths by going to Project / Options. Set the Include path. Do this from the
574    "Base" option to apply to both Release and Debug builds. Now add the following
575    files to the project:
576    
577    pcre.h
578    pcre16_byte_order.c
579    pcre16_chartables.c
580    pcre16_compile.c
581    pcre16_config.c
582    pcre16_dfa_exec.c
583    pcre16_exec.c
584    pcre16_fullinfo.c
585    pcre16_get.c
586    pcre16_globals.c
587    pcre16_maketables.c
588    pcre16_newline.c
589    pcre16_ord2utf16.c
590    pcre16_printint.c
591    pcre16_refcount.c
592    pcre16_string_utils.c
593    pcre16_study.c
594    pcre16_tables.c
595    pcre16_ucd.c
596    pcre16_utf16_utils.c
597    pcre16_valid_utf16.c
598    pcre16_version.c
599    pcre16_xclass.c
600    
601    //Optional
602    pcre_version.c
603    
604    7. After compiling the .lib file, copy the .lib and header files to a project
605    you want to use PCRE with. Enjoy.
606    
607    Optional ... Building PCRE using the makevp.bat file:
608    
609    1. Edit makevp_c.txt and makevp_l.txt and change all the names to the 16 bit
610    versions.
611    
612    2. Edit makevp.bat and set the path to C++ Builder. Run makevp.bat.
613    
614    Another PCRE user added this comment:
615    
616    Another approach I successfully used for some years with BCB 5 and 6 was to
617    make sure that include and library paths of PCRE are configured before the
618    default paths of the IDE in the dialogs where one can manage those paths.
619    Afterwards one can open the project files using a text editor and manually add
620    the self created library for pcre itself, pcrecpp doesn't ship with the IDE, in
621    the library nodes where the IDE manages its own libraries to link against in
622    front of the IDE-own libraries. This way one can use the default PCRE function
623    names without getting access violations on runtime.
624    
625      <ALLLIB value="libpcre.lib $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib"/>
626    
627    
628  BUILDING PCRE ON OPENVMS  BUILDING PCRE ON OPENVMS
629    
630  Stephen Hoffman sent the following, in December 2012:  Stephen Hoffman sent the following, in December 2012:
# Line 647  There is also a mirror here: Line 761  There is also a mirror here:
761    http://www.vsoft-software.com/downloads.html    http://www.vsoft-software.com/downloads.html
762    
763  ==========================  ==========================
764  Last Updated: 28 April 2013  Last Updated: 14 May 2013

Legend:
Removed from v.1320  
changed lines
  Added in v.1332

  ViewVC Help
Powered by ViewVC 1.1.5