In order to use Zoidcom in your project, these prerequisites need to be met:
-
The project needs to be in C++ or a language wrapper for the project's language needs to be written.
-
For linking with Zoidcom the project must use Visual Studio, a GCC based compiler (Cygwin, MingW/DevCPP, GCC) or a compiler that can use C++ libraries produced by any of the former two
The setup itself is simple:
-
For compilation: Copy all Zoidcom header files into one of the compiler's include search directories or add Zoidcom's include directory to the compiler's list of include search paths. If you installed Zoidcom through a DevCpp DevPak file, this step is already done for you.
-
For compilation: Add 'include <zoidcom.h>' to the top of each sourcefile using Zoidcom.
-
For linking:
-
For MSVC: Add zoidcom_vc.lib directly to the project or write it's name into the input line in Project Settings/Linker/
-
For DevCpp: Add libzoidcom_mw.a (if necessary with full path) to the linker line in the project options.
-
For GCC: Link with gcc yourobjectfile1.o yourobjectfile2.o -L directory/to/zoidcoms/libdir -lzoidcom
-
For running:
-
Windows: Copy zoidcom_vc.dll into the directory of your app's .exe file.
-
Linux #1: Copy libzoidcom.so into any of your system's library paths.
-
Linux #2: Copy libzoidcom.so into the app's executable path and execute
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
Then run the app. The export needs to be done everytime a new shell is opened, so a script might help there: #! /bin/sh
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
./name_of_your_binary
Save the script as runit.sh and instead of running the app directly, run it through the script.
All library files come in an additional debug version, with the same name as the normal version except an additional 'd' at the end (libzoidcom_mw.a becomes libzoidcom_mwd.a and so on). The debug libraries do not contain any debug symbols. What they do is performing lots of API usage checks plus they embed lots of debug information into the network stream, which makes them incompatible with the non-debug versions. Detected errors are reported through asserts as well as through Zoidcom's logging facility. The most important function is bitstream type checking.
This code will assert with the debug library:
This will be helpful in many places, especially when writing custom replicators, as errors like above will render a complete packet unusable for Zoidcom everytime they occur.
This file is part of the documentation for Zoidcom. Documentation copyright © 2004-2007 by Jörg Rüppel. Generated on Wed Jan 3 20:38:20 2007 for Zoidcom by
1.4.6-NO