473,320 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Lnk Error 2001

105 100+
I am using a function template in my project which is member of a class and I have included the header file of this class.But I am getting a linking error

LNK 2001: error LNK2001: unresolved external symbol "public: float __thiscall test::fillvalue<float>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::vector<class h *,class std::allocator<class h *> > *,struct Filter::t * const,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??$fillvalue@M@test@@QAEMV?$basic_string@DU?$char _traits@D@std@@V?$allocator@D@2@@std@@PAV?$vector@ PAVKV@@V?$allocator@PAVKV@@@std@@@2@QAUtparam@Filt er@@0@Z)


I have checked the parameters where the function template is called.I am not ablt to resovle it.Where can I check this error?Do I have to include something?

Thanks in advance
Apr 13 '07 #1
2 2104
weaknessforcats
9,208 Expert Mod 8TB
Firstly, you do not call templates.

Templates are patterns used by the compiler to create functions. That means the function template must be in the same file as the the function call. In this case a copy of your test::fillvalue() function template will be made substituting float for the type. It is this function that the linker is looking for.

That means, you cannot have your function template in another file and use it with function prototypes.

The LNK2001 error from the linker says the test::fillvalue<float> function does not exist.

If your template is in your included header file, be sure the function call matches the argument list in the template.
Apr 15 '07 #2
mickey22
105 100+
Thanks a lot for yourhelp.I have included the template definition also in the header file itself rather than in the .cpp file, then it worked.

Thank you once again.
Apr 16 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: frr | last post by:
Hi, After upgrading to 2.4 (from 2.3), I'm getting a weird syntax error: >>> import themes Traceback (most recent call last): File "<interactive input>", line 1, in ? File "themes.py", line...
2
by: Artur | last post by:
Hi Newsgroup, im currently working on programming a asp.net application consuming an Webservice hosted on Apache/Axis. I have generated WSDL and Proxy classes from VisualStudio.net. But when...
0
by: Adam Smith | last post by:
Hello. I've got a total of 5 schemas. They are: 1 - 1.xsd - a description of a city 2 - 2.xsd - a description of a town 3 - CityHall.xsd - a description of a cityhall-meant to be part of a...
5
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace )...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
1
by: gerr | last post by:
Visual studio 2003 "HTTP/1.1 500 Internal Server Error" when trying to create a new Asp.net site with Visual Studio 2003 on localServer/IIS 5.1. Anyone have any new solutions or urls to point me...
7
by: Jorgen Haukland, Norway | last post by:
Hi, I have created a Java webservice which runs in IBM WebSphere appserver. I take the WSDL-file and create a VS.NET WinForm application and calls the service running on my PC and everything...
1
by: Kenny Ho | last post by:
Hi, I have written the following schema that contains the XML signature: ----------------------------------------------------------------------- <?xml version="1.0" encoding="utf-8" ?>...
1
by: Moon Chung | last post by:
Hello, Has anyone used Testing Tools from WS-I (www.ws-i.org)? I am building a Web Service and hopefully it would be interoperable. When I ran Testing Tool, I am getting BP1212 error. I...
3
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.