i'm a newbie and tinyxml will be the first external library that i will use in a c++ app.
my question is simple, how can i make tinyxml.h globally accessible from c++ apps. I'm using linux. I've added tinyxml .o and .h files into /usr/lib/tinyxml/ and pointed this directory in /etc/ld.so.conf . But this didn't work.
Please help. Thanx for your helps and this library..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wouldn't recommend message with directories and files (such as you named) that require root privilege. When you're working on real apps in the wild you almost certainly won't have that luxury ;)
So lets say you install tinyxml to ~/dev/tinyxml/. If I recall correctly tinyxml doesn't have a specific include directory nor a lib dir.
Lets say you put your app in ~/dev/killerapp. For the .h file you'll need to tell gcc/g++ about the extra include dir, like this:
g++ -I ~/dev/tinyxml <otherstuff>
When it comes to linking you'll need to tell it to link the .lib/.so that you've built.
Funny, but I'm rusty with linux these days. If I recall correctly and if your app is defined in the file killerapp.cpp then you'll do something like
Hi all,
i'm a newbie and tinyxml will be the first external library that i will use in a c++ app.
my question is simple, how can i make tinyxml.h globally accessible from c++ apps. I'm using linux. I've added tinyxml .o and .h files into /usr/lib/tinyxml/ and pointed this directory in /etc/ld.so.conf . But this didn't work.
Please help. Thanx for your helps and this library..
I wouldn't recommend message with directories and files (such as you named) that require root privilege. When you're working on real apps in the wild you almost certainly won't have that luxury ;)
So lets say you install tinyxml to ~/dev/tinyxml/. If I recall correctly tinyxml doesn't have a specific include directory nor a lib dir.
Lets say you put your app in ~/dev/killerapp. For the .h file you'll need to tell gcc/g++ about the extra include dir, like this:
g++ -I ~/dev/tinyxml <otherstuff>
When it comes to linking you'll need to tell it to link the .lib/.so that you've built.
Funny, but I'm rusty with linux these days. If I recall correctly and if your app is defined in the file killerapp.cpp then you'll do something like
g++ -I ~/dev/tinyxml KillerApp.cpp
g++ -o KillerApp KillerApp.o ~/dev/tinyxml/tinyxml.lib
Thats more-or-less it. Look in the tinyxml Makefile, or hunt around on the web for basic getting started with C++ on linux.
HTH
Ellers