SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

This library is normally built with the latest version of gcc (version 3.4.0 as of this writing). We've designed it to work with both Linux and Mac OS X (client and server). As of version 2.4.0, the library is built using libtool, which dramatically increases the probability that the code can be compiled on other platforms.


LICENSE

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

If you would like to integrate this library into your project and feel that the license does not meet your needs, please contact us for alternate licensing arrangements.


To build the library:

  1. Execute the ./configure script to create the makefile. There are a few options for configure, which you can see by passing a --help argument to it. Here are the specific options of
    interest

--enable-all-libs Builds all optional libraries below.

    --prefix=DIR                Designates the base installation
                                directory for 'make install'.  Header
                                files will be installed into
                                DIR/include and libraries will be
                                installed into DIR/library.  Defaults
                                to /usr/local.
    
    --disable-bti-alloc         The library normally uses our own
                                custom-built memory allocator.  This
                                option forces the library to use the
                                default STL allocator instead.
    
    --disable-pthread-obj       Pthread support is also normally
                                built into the library, used via the
                                bti_pthread_obj module.  This option
                                disables thread support and prevents
                                that module from building.
    
    --enable-bti-compat-v1      If you're upgrading from the previous
                                released version of the BTI library,
                                you might want to enable this option.
                                It affects only the TBuffer and TString
                                classes, adding inline methods that
                                map old to new function names.
    
    --enable-cgi                Determines whether the separate CGI
                                scripting support module (libbti_cgi)
                                is built or not.  Does not build by
                                default.
    
    --enable-expat              Determines whether the separate expat
                                class wrapper module (libbti_expat)
                                is built or not.  Does not build by
                                default.  Note that this module
                                requires the expat library, which
                                is not provided here.
    
    --enable-gdb                Add symbolic debugging information
                                to all libraries for gdb.
    
    --enable-iconv              Determines whether the separate iconv
                                class wrapper module (libbti_iconv)
                                is built or not.  Does not build by
                                default.  Note that this module
                                requires the iconv library, which
                                may be part of your OS distribution
                                but may also not be.  In either case,
                                it isn't provided here.
    
    --enable-sendmail           Determines whether the separate
                                sendmail support module
                                (libbti_sendmail) is built or not.
                                Does not build by default.
    
    --enable-soundex            Determines whether the separate
                                Soundex module (libbti_soundex)
                                is built or not.  Does not build
                                by default.
    
    --enable-smtp               Determines whether the separate
                                SMTP module (libbti_smtp) is built
                                or not.  Does not build be default.
    
    --enable-tcp                Determines whether the separate
                                TCP/IP support module (libbti_tcp)
                                is built or not.  Does not build by
                                default.
    
    --enable-wordstem           Determines whether the separate
                                Porter Word Stemming module
                                (libbti_wordstem) is built or not.
                                Does not build by default.
                                
    --enable-mysql              Determines whether the separate MySQL
                                support module (libbti_db) is built
                                or not.  Does not build by default.
                                Note that this module requires the
                                presence of the MySQL client library.
    
    --with-bind-dir=DIR         Tells configure the base directory
                                of another version of bind.  The
                                libraries should be in DIR/lib and
                                the header files in DIR/include.
                                Active only when --enable-smtp is
                                also used.  This is typically not
                                necessary, as most distributions
                                have a built-in version of bind
                                that can be used.  However, an
                                external version can be useful, as
                                you can make a high-performance
                                threaded version (something that
                                the built-in version usually is not).
    
    --with-mysql-dir=DIR        Tells configure where to find the
                                base directory containing the
                                MySQL client libraries and header
                                files.  Active only when
                                --enable-mysql is also used.
                                Defaults to /usr/local/mysql.
    
    --with-optimize=LEVEL       Sets the compiler optimization
                                level.  Valid LEVELs are 0-3.
                                Default is 2.

2) Execute 'make' to create the entire library in its current

directory.

3) If you would like to make the libraries and include files accessible

to your entire system, execute 'make install'. The normal install location is /usr/local, but you can override that with the --prefix=DIR argument.

*) To make only the BTI Thread Allocator module, make sure you have

NOT selected --disable-bti-alloc during configure, then execute 'make bti_thr_alloc' to build only that module (libbti_thr_alloc).


The magic line: 'using namespace bti;'

The number one question we receive from someone trying to use part of this library is a request to solve compile-time errors that look like this:

blah.cc:16: error: `TString' undeclared (first use this function)

When everything else looks right -- most especially, the correct header files are #included -- then the solution usually involves namespaces. Since our entire library is built within the 'bti' namespace, you have to either declare that you'll be using it in lots of places:

using namespace bti;

or you have to prefix the class names/functions/methods as appropriate:

bti::TString foo("some text");


Please send bug reports, questions and comments to core-lib@bti.net. We look forward to hearing from you!


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.