Yeahm, you need to be careful .. if you link a C++ lib, then any caller should be built by C++ compiler as well, or if a C compiler, then your lib must be "Extern C".
Not that you can make a bridge as well .. You can have a C++ lib, and a C program, and then make a little middle-guy that has extern "C" functions but is compiled by C++ (g++) and so can talk to the C++ lib.
So you can pretty much get away with anything from C to C++, but what I suggest is .. if you want a C++ lib (using g++), then use g++ on your projects as well, and not too many concerns. Or be careful with your extern "C" markings so gcc and g++ play nicely together (and I'd suggest doing it anyway, to be explicit.)
--
Note that historically and for good reasons, sometimes you need extra pragma's in g++'s class headers and implementations to make linking work efficiently; ie: on many desktop systems like Windows, Mac etc the vendor of the OS supports the linker -- for Windows, the linker comes with the compiler, so they can cheat a lot. With Unix and Linux you can 'assume' somethign similar but its not right, since some vendors supply the linker with the OS, and the compiler would be gcc in this case (say). ie: You coudl use Solaris, and use the Sun CC and Sun linker .. but if you use Solaris with gcc and Sun linker, we're tlaking different folks for linker and compiler.. so no cheating. So to be broadly supporting, gcc sometimes has to have some help .. consider --
In the case where you have a C++ lib, and 2 normal files refer to it (so a lib, and two .o's that need it); for C++, instanciated class stuff, then if the compielr and linker are not the same vendor and don't know each other too well, then the compiler may assume it needs to instanciate the class into each .o just to make sure its there -- since it may not know if another .o file will instanciate it. Without doing thatm, then the dev needs to make another .o that explicitly instanciated any classes, or use special markup to say 'for this .o ionstanciate, but for this other one, do not.' So in some compiler/linker mixtures you end up with a class instanciated from template in multiple .,o files, making for giant application with multiple codebases for the same templates. ie: Instea d of a 10k app, you might have a 20k one, with some code duplicated. Other ways a linker can work are to keep a database and say hey, we instanciated that template for object1.o, so lets skip it for object2.o .. but is that at compiler or linker stage? does linker need magic to say 'saw that, skip it..'. When multiepl vendors are involved, and multiple ways of doing things.. . its just a big old mess.
So g++ includes pragmas to help control all these different possible things. So in the _worst case_, you have to manually control template instanciation, which sucks ass, but it absolutely makes sense why its like that, and its not anyones fault except for having a non-monoculture for linker/compiler. But Windows and Mac folks often see this as a liability, since they're used to the 'single compiler option'.
Now, more recent g++'s and environments and whatnot have alleviated all this, but you may find notes about it online to scare the heck out of you.
So remember..
You probably don't need to care. But if you do, its really not as bad as it all may sound from notes or the above. At worst its just a drag, but it does all demystify how things work.. where as usually you just trust 'it'll all work', but you dont know for sure
--
Horror story .. there was a time long ago when a builf of MS compielr TI hink did it like this.. a per-project database of instanciations; so if STL got used for linked lists, it'd get instanciated into code once per use (ie: a hash table of string to int mapping woudl get instanciated once, and string to string once.. so if two object files in same project used string-to-string hash tab le say, only one copy of the code, since its in the project DB. But if you had two projects in overlapping directories, you'd randomly have functions missing when linking and other mishaps. A database is easy for one project but leda to sync problems.. no database means code duplication in generated binary. ITs always a pita
jeff