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.
Download and build ProteoWizard.
In what follows, <pwiz_root>
refers to the directory where you put ProteoWizard.
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
Windows | C:\\ |
---|---|
Linux | /usr/local |
MacOS | /usr/local |
Make a new directory hello
and copy the example file <pwiz_root>/doc/technical/hello_pwiz/hello_pwiz.cpp
to it.
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:
Windows | Linux | MacOS | |
---|---|---|---|
static linking | libpwiz_data_msdata.lib | libpwiz_data_msdata.a | |
shared linking | pwiz_data_msdata.dll | libpwiz_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
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!