Build Process
From Xvr2
Building libraries
Before X-VR2 version 0.7.1.0 the build process was merely implemented by shell scripts which generated the proper Makefiles in order to build the project using gcc and GNU make. That process did not work very well since it was very hard to verify some dependencies as well as made my life horrible everytime I had to verify for new dependencies or add more features.
Since the beginning of the project there was the need of implementing GNU build tools (autoconf, automake, libtool, etc) however in the past I did not have the time to poke with it that much. Fortunately I've found some very nice documentation lately so I could finally implement those missing bits in the build process.
To build X-VR2 support libraries you'll have to move to the respective library directory located under the libs directory beneath the parent directory, if you're an X-VR2 developer you might need to run the autogen.sh script in order to rebuild the configure scripts and the Makefiles; after that you just need to run configure, make and make install.
There is a more automated way to build all dependendies take a look at the autogen-all.sh, compile-all.sh, recompile-all.sh but if you prefer to build each one of them manually (you might prefer to build some libraries in debug mode?) then look at the COMPILATION_ORDER file located in the same directory ({parent_dir}/libs).
Building end-user applications
In the past (versions previous to 0.7.1.0) end-user applications just need to include the xvr2.h header file and compile using the flags and libraries obtained from the xvr2-config.sh script which basically told the linker to link the application against all libraries and since the xvr2.h header file included all headers too the resulting binary was very big, with the new approach you only include the headers you need and compile against the libraries you need.
Let's say you have an app which makes use of the String and Console classes, then your source file might look like this:
#include<xvr2/Console.h>
#include<xvr2/String.h>
//Optional, use it if you which to call the classes as Console instead of xvr2::Console and String
//instead of xvr2::String
using xvr2::Console;
using xvr2::String;
int main(){
Console con;
String a;
/*
* Here goes your code
*/
return 0;
}
You might notice that the include directives have the xvr2/ prefixed after each header file, this is required and you must do it like that allways, anyway lets say that you save the code in a file name testprogram.cpp, then you'll be compiling it like this:
c++ -o testprogram testprogram.cpp `pkg-config xvr2core --cflags --libs`
Right we've dropped xvr2-config.sh for pkg-config as you can see the compilation command is not that different as it used to be in the past, you might be asking how are you supposed to know that the right library to call for pkg-config was xvr2core and not any other, well, the truth is that you should already know it if you've read the documentation.

