Hi Torben,

One question regarding the header files:

If I have build a library with old dependency version, and than I replace the 
header file with a newer one, this possibly changes the API. It's not possible 
to use the lib of the old headerfiles with a headerfile of a newwer API, isn't 
it?

That always depends if the library exposes its internal dependencies. Generally not.

For example, take OSG itself. It has a png plugin, so you can tell it to read a PNG file. But you could also (for any number of reasons) decide to link your application directly to libpng. The two versions (the version OSG was linked to, and the version your app links to) can be different versions, because OSG does not give you any access to its internal version of libpng. As long as the OSG png plugin's code is written to work with the version of libpng that it's being compiled with, and your app's code is written to work with the version of libpng you're compiling/linking with, there's no problem if the API is different between those two versions, they don't even know about each other.

The only time this may cause a problem is if your app links to libpng statically, and links to OSG (including the png plugin) statically as well. Then the symbols of the libpng library would be present twice. But otherwise, since OSG itself uses its png plugin as a DLL, your app could link to libpng either statically or dynamically, it won't matter and it will work.

I hope this example makes things clearer for you...

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to