Constructing C++ XML Tasks In Linux
This tutorial describes how to develop C XML projects using a Linux operating system, making use of the Liquid XML Data Binder. [mod]Remove Ad link [/mod]
At The Start - The Startup
First of all, you are going to first have to make your library from the xml schema (Observe: you've got to execute this on a Windows platform because the Wizard is for Windows only). Doing so will let you have a file called Makefile_Linux that should compile and link your library. The next task is to copy the project file and all .cpp and .h files to your Linux system. After that you can create a new project on Linux for use in your application.
Modifying The Makefile
You might need to modify the Makefile_Linux file to set up paths relevant to your own system. The default values are the following:
# compiler include dirs
CPP_INCLUDES=-I../Bin/Redist8/cpp/include
# external libs path
RELEASE_LIB_PATH=-L../Bin/Redist8/cpp/linux/bin
DEBUG_LIB_PATH=-L../Bin/Redist8/cpp/linux/bin
Each of these paths must point to the redistributable files supplied as part of the Liquid XML Data Binding Wizard install.
Running make
The makefile has been tested against GNU g on Linux x86 32 bit (g 3.2 under RedHat 8.0, g 3.2.2 under
Mandrake 9.1, g 3.4.1 under Mandrake 10.1 and g 4.2.4 under Ubuntu 8.0), and Linux x86 64 bit (g 4.0.0 under Fedora Core 4.0.0).
Be aware: g 3.3.x and 3.4.0 fail to work due to a compiler issue, but 3.4.1 operates fine!!
Providing you have this available on your path, you can simply type 'make -fMakefile_Linux' from the command line within the suitable directory and both debug and release builds of you library will be built.
Other targets included in the Makefile are:
release - release build only
debug - debug build only
clean - deletes any object and library files previously created
release_clean - deletes release files only
debug_clean - deletes debug files only
Connecting to your Library
So that you can link against your library you have got to incorporate both the path to the Liquid Technologies runtime header and library files along with the generated header and library files within your applications makefile. In order to operate your application you will furthermore want all libraries to be on the library path. This can be done by putting the directories to the LD_LIBRARY_PATH.
Last edited by onebuck; 06-19-2012 at 08:48 AM.
Reason: remove ad link
|