468,301 Members | 1,487 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,301 developers. It's quick & easy.

Linker Errors - symbols pointing to templates not resolved

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
1 1893
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.

Similar topics

1 post views Thread by Generic Usenet Account | last post: by
12 posts views Thread by Fabio De Francesco | last post: by
3 posts views Thread by Grahamo | last post: by
4 posts views Thread by Joel Whitehouse | last post: by
3 posts views Thread by ralphsieminsky | last post: by
reply views Thread by VivekR | last post: by
5 posts views Thread by Mark | last post: by
2 posts views Thread by Oneironaut | last post: by
2 posts views Thread by Markus Dehmann | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.