Linker Errors - symbols pointing to templates not resolved

R

Rebecca Hoffmann

Hi,

I have a serious problem while compiling a small project (a part of
the Modular Flow Scheduling Middleware: ex1):

There are 3 linker errors, all from symbols that point to templates:

-- verbose build output --------------------------------------------

ex1.obj : error LNK2001: unresolved external symbol "public: virtual
void * __thiscall fsf::CCellFactory<class
myspace::CMyCell>::Instantiate(void)"

ex1.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall fsf::CCellFactory<class
myspace::CMyCell>::CCellFactory<class myspace::CMyCell>(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"

ex1.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: virtual __thiscall
fsf::CCellFactory<class myspace::CMyCell>::~CCellFactory<class
myspace::CMyCell>(void)"
--------------------------------------------------------------------

I am quite sure that the code is working and I just have a wrong
configuration-setup. But all necessary libraries are included and
selected in the directories-setting.

I am using VisualStudio .NET pro 2003 running WinXPpro

Does anybody have an idea, what mistake I have made (especially
concerning the linking of template-declarations)?

Thank you in advance
Rebecca Hoffmann
 
B

baumann@pan

the problem i think has been described in the book:C++ templates
complete guides


one solution is so-called inclusion , it's declaration of the templates
and its implemention are in the same file,

or you can you use export keyword before the declaration.

simply say, it's involved with templates instantiation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top