Coder Social home page Coder Social logo

libbson's Introduction

Libbson

libbson is a library providing useful routines related to building, parsing, and iterating BSON documents.

Building

Libbson tries to support a variety of operation systems and architectures. The following are known to work. If your platform is not listed here, it may still work, we simply haven't tested it. If you would like us to add your platform here, we would be happy to hear from you.

Supported Operating Systems

  • RHEL/CentOS 5, 6, 7beta
  • SLES 11 SP3
  • Ubuntu 12.04 LTS
  • Debian 7
  • SmartOS
  • Solaris
  • FreeBSD 10
  • Windows Vista, 7, 8, 10
  • OS X 10.8

Supported Architectures

  • x86
  • x86_64/amd64
  • SPARC
  • ARM
  • PowerPC

Supported Compilers

  • GCC 4.1 and newer
  • Clang 3.3 and newer
  • Visual Studio (MSVC) 2010 and newer
  • Oracle Solaris Studio (5.7 and newer, Solaris 10)

Dependencies

Fedora / RedHat Enterprise / CentOS

yum install git automake autoconf libtool gcc

Debian / Ubuntu

apt-get install git-core automake autoconf libtool gcc

FreeBSD

pkg install git automake autoconf libtool gcc pkgconf

OS X

You'll need to have Xcode (at least the command-line package) and we recommend using Homebrew for other dependencies.

brew install automake autoconf libtool pkgconfig

SmartOS

pkgin install git automake autoconf libtool gcc47 gmake pkg-config
export PATH=/opt/local/gcc47/bin:$PATH

Windows Vista and Higher from Git

Builds on Windows Vista and Higher require cmake to build Visual Studio project files. Alternatively, you can use cygwin or mingw with the automake based build.

git clone git://github.com/mongodb/libbson.git
cd libbson
cmake.exe -G "Visual Studio 10 Win64" "-DCMAKE_INSTALL_PREFIX=C:\install\path"
msbuild.exe ALL_BUILD.vcxproj
msbuild.exe INSTALL.vcxproj

For the adventurous, you can cross-compile for Windows from Fedora easily using mingw.

sudo yum install mingw64-gcc automake autoconf libtool
./configure --host=x86_64-w64-mingw32

From Git

git clone git://github.com/mongodb/libbson.git
cd libbson/
git checkout x.y.z  # To build a particular release
./autogen.sh
make
sudo make install

You can run the unit tests with

make test

From Tarball

tar xzf libbson-$ver.tar.gz
./configure
make
sudo make install

Configuration Options

You may be interested in the following options for ./configure. These are not availble when using the alternate CMake build system.

--help                    Show all possible help options.
                          There are many more than those displayed here.

--enable-optimizations    Enable various compile and link optimizations.
--enable-debug            Enable debugging features.
--enable-debug-symbols    Link with debug symbols in tact.
--enable-silent-rules     Force silent rules like the Linux kernel.
--enable-coverage         Compile with gcov support.
--enable-static           Build static archives (.a).

Developing using libbson

In your source code:

#include <bson.h>

To get the include path and libraries appropriate for your system.

gcc my_program.c $(pkg-config --cflags --libs libbson-1.0)

Examples

See the examples/ directory for how to use the libbson library in your application.

Documentation

See the doc/ directory for documentation on individual types.

Bug reports and Feature requests

Please use the MongoDB C Driver JIRA project to report bugs or request features.

libbson's People

Contributors

chergert avatar ajdavis avatar bjori avatar hanumantmk avatar ksuarz avatar jmikola avatar maxime2 avatar itay avatar gjmurakami-10gen avatar fionarowan avatar tylerbrock avatar shaneharvey avatar paulmelnikow avatar ekd123 avatar michaelkuhn avatar guruofquality avatar jeroen avatar jjchoy avatar amidvidy avatar mntmnt avatar puppyofkosh avatar skaes avatar machyne avatar smila001 avatar derickr avatar xpol avatar danielcolchete avatar mapx avatar mindnever avatar schoentoon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.