Re: Template wrapper link query
On Jun 3, 8:50 pm, Paavo Helde <pa...@nospam.please.ee> wrote:
PGK <graham.k...@gmail.com> kirjutas:
I'd like to wrap a series of "C" library functions using
instantiated templates. I'd also like to have this interface
in a header file, but not require the user to link to the
"C" library.
Microsoft Visual C++ has #pragma comment(linker, ...) which
can be used for linking in the needed libraries whenever the
library headers are included. This seems like a feature you
are looking for. However, this is an implementation-specific
extension and thus off-topic here. I don't know if other
compilers provide something similar.
I don't think they do, but I don't think that solves his
problem, either. All the pragma does is free the client from
having to specify the name of the library when linking. The
library still must be present on the system, somewhere where the
compiler knows to look (a directory specified by /LIBPATH, or
the %LIB% environment variable), and the library will still be
linked into the final executable.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34