By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,058 Members | 1,217 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,058 IT Pros & Developers. It's quick & easy.

Linker Errors - symbols pointing to templates not resolved

P: n/a
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

--
mail: re**************@tut.fi
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

Rebecca Hoffmann wrote:
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

--
mail: re**************@tut.fi


Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.