G
Georg Teichtmeister
Hello!
We are developing a math - library for realtime applications and want to
use some given mathlibraries as base(ipp, MTL, .. ). Our library is a
wrapper for those and you should be able to select the underlying
library by template parameter. Therefore we split up our library in two
namespaces:
The first one defines namespace-global functions which call the
baselibrary functions. These are templatefunctions which some
spezialitions for double and float.
The second one defines classes, where the functions of the first
namespace will be called.
Now comes the problem: If I include our mathlibrary into two
compilationunits the linker gives a error which says:
A.lo:in function Namespace1::ns_globalfunction:
A.lo:multiple definition of ns_globalfunction
B.lo:first defined here
And this comes for every namespaceglobal template function of the first
namespace for every spezialition.
regards,
Georg
We are developing a math - library for realtime applications and want to
use some given mathlibraries as base(ipp, MTL, .. ). Our library is a
wrapper for those and you should be able to select the underlying
library by template parameter. Therefore we split up our library in two
namespaces:
The first one defines namespace-global functions which call the
baselibrary functions. These are templatefunctions which some
spezialitions for double and float.
The second one defines classes, where the functions of the first
namespace will be called.
Now comes the problem: If I include our mathlibrary into two
compilationunits the linker gives a error which says:
A.lo:in function Namespace1::ns_globalfunction:
A.lo:multiple definition of ns_globalfunction
B.lo:first defined here
And this comes for every namespaceglobal template function of the first
namespace for every spezialition.
regards,
Georg