Hi everyone,
What compiles, links and runs perfectly on my home Linux station, compiled with GNU gxx-4. , does compile but not link with VisualStudio 2005.
The problem is that the linker apparently finds the copy constructor for my class Vector in the header Matrix.h too, but it just isn't there.
The same actually holds for ALL operators !
Voilà two of the error messages:
[cc] Vector.obj : error LNK2005: "public: __thiscall LinAlg::Vector<class LinAlg::Complex>::Vector<class LinAlg::Complex>(class LinAlg::Vector<class LinAlg::Complex> const &)" (??0?$Vector@VCom
plex@LinAlg@@@LinAlg@@QAE@ABV01@@Z) already defined in Matrix.obj
[cc] Vector.obj : error LNK2005: "public: class LinAlg::Vector<class LinAlg::Complex> & __thiscall LinAlg::Vector<class LinAlg::Complex>:: operator=(class LinAlg::Vector<class LinAlg::Complex> c
onst &)" (??4?$Vector@VComplex@LinAlg@@@LinAlg@@QAEAAV01@AB V01@@Z) already defined in Matrix.obj
Thanks a lot for your help!!!
Mark



LinkBack URL
About LinkBacks


