hello_pwiz Tutorial for other build tools

In order to create a Visual Studio, XCode, or makefile project that uses ProteoWizard, it is convenient to have all of the libraries in one place. By default, each one is found down a different directory path unique for one build configuration (e.g. debug or release, static or shared linking). Having chosen a build configuration you can use the "install" feature to copy those libraries to a central location. This tutorial will take you through the steps of installing the ProteoWizard libraries and headers and creating a new command-line tool using ProteoWizard.

  1. Download and build ProteoWizard.  In what follows, <pwiz_root> refers to the directory where you put ProteoWizard.

  2. Copy the libraries and header files to a central location by running this command from <pwiz_root>:
    $ ./quickbuild.sh libraries

    The default system-dependent installation location can be changed with the option --prefix. For example, the command $ ./quickbuild.sh libraries --prefix=$HOME/extern will copy the libraries to $HOME/extern/lib and the header files to $HOME/extern/include. Or you can control the two locations independently with the options --libdir and --includedir.

    The default directories are
    WindowsC:\\
    Linux/usr/local
    MacOS/usr/local

  3. Make a new directory hello and copy the example file <pwiz_root>/doc/technical/hello_pwiz/hello_pwiz.cpp to it.

  4. Build hello_pwiz with the build tools of your choice. Set your header file include path to look in <prefix>/include and set your library include path to look in <prefix>/lib. Link to these libraries.

    Note that this list is specific to the hello_pwiz tool. Other tools may require additional libraries. Note too that the library names will differ depending on the build configuration. For example, pwiz_data_msdata has these names:
     WindowsLinuxMacOS
    static linkinglibpwiz_data_msdata.liblibpwiz_data_msdata.a
    shared linkingpwiz_data_msdata.dlllibpwiz_data_msdata.so

    Here is an example build command using the g++ compiler.
    g++ -I/user/local/include/ hello_pwiz.cpp -L/user/local/lib -lpwiz_data_msdata -lpwiz_data_common -lboost_system-gcc44-mt-s -lboost_iostreams-gcc44-mt-s -lpwiz_utility_misc -lboost_filesystem-gcc44-mt-s -lpwiz_utility_minimxml -lz-gcc44-mt-s-1_2 -lboost_thread-gcc44-mt-s -lboost_regex-gcc44-mt-s -pthread -lpwiz_data_msdata_version -o hello_pwiz

  5. You should now have an executable hello_pwiz. You can test it:
    $ hello_pwiz <pwiz_root>example_data/tiny.pwiz.1.1.mzML

Now you're up and running!



Technical documentation home