473,499 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2062
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1831
by: Generic Usenet Account | last post by:
I am "plugging in" a class type into an STL map definition and I am getting linker errors unless all my class definitions are defined in the header file, as opposed to a separate source file. This...
12
1947
by: Fabio De Francesco | last post by:
Hello. I can't understand why I can't compile the following simple code, where I think I have applied all the needed rules for templates that are declared and defined in different files (*.h and...
3
1650
by: Grahamo | last post by:
Hi, I have a question that pertains to Templates and link time. This is totally for my own understanding and to correct what's obviously an erroneous view of things on my behalf; Lets say I...
4
1800
by: Joel Whitehouse | last post by:
Hello All, I have a Visual C++ 2003 dll solution in a directory called "Antenna Test Range Control", and when I comile it, I get the error LNK1104: cannot open file "antenna.obj". When I remove...
3
3270
by: ralphsieminsky | last post by:
A project compiles fine under VS 2005 RC without the /clr option. However, when /clr is turned on several errors appear: - A symbol exported from a DLL is not found by another DLL referencing...
0
1735
by: VivekR | last post by:
I have a MFC application developed using VC++ 5. Recently I ported that to VC++ 7.1 and now I am trying to compile the MFC application with /CLR under VC++ 7.1. And I get linker errors referring to...
5
2642
by: Mark | last post by:
Sorry for creating such a newbish topic, but I just can't seem to figure out what the problem is here. // main.cpp #include <cstdlib> #include <iostream> #include "Vector.h" using namespace...
2
2766
by: Oneironaut | last post by:
Hello friends, I have an issue with a linker warning. It is the warning LNK4089. I am working in MSVC6.0 I investigated and this warning tells that the import of the library to which it makes...
2
2406
by: Markus Dehmann | last post by:
What to do if an external library is header-files-only (but you have to use it), and you get lots of linker errors? You will necessarily get linker errors "multiple definition of ..." if you try...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.