Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Linking error LNK2001 - "__declspec(dllimport) private: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Tidy(unsigned short)" (__imp_?_Tidy@?$basic_string@DU?$char_

Reply
Thread Tools

Linking error LNK2001 - "__declspec(dllimport) private: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Tidy(unsigned short)" (__imp_?_Tidy@?$basic_string@DU?$char_

 
 
sharmadeep1980@gmail.com
Guest
Posts: n/a
 
      07-07-2006
Hi All,

I am facing a very unique problem while compling my project in
"Release" build.
The project is building in DEBUG mode but giving linking error on
Release build.
Here is the error:
Creating library Release/fnimqcmd.lib and object
Release/fnimqcmd.exp
CoIMQCmd.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) private: void __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::_Tidy(unsigned short)"
(__imp_?_Tidy@?$basic_string@DU?$char_
traits@D@std@@V?$allocator@D@2@@std@@AAEXG@Z)
CoIMQCmd.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) private: unsigned short __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::_Grow(unsigned int,unsigned short)"
(__imp_?_Grow@?
$basic_string@DU?$char_traits@D@std@@V?$allocator@ D@2@@std@@AAEGIG@Z)
Release/fnimqcmd.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

My project is a MFC extension DLL using "Use MFC in shared DLL". I
started running into this problem when I have used STL::vector in my
project. Somehow I feel that this is the cause of the problem but not
able to locate the reasons.

Furthermore, I am able to compile the project in "Debug"
confiiguration. In "Release" configuration if we turn off the
optimization i.e project settings->Optimization-> Disable(Debug) we are
able to link it successfully.

Following are some more project settings under C/C++ tab->Code
generation:-

Processor->Blend*
Use run-time library-> Multithreaded DLL(/MD)
Calling Conventions -> __cdecl*

My product build is being stucked due to this project so an early
response would be highly appreciated.

Thanks in advance.

Regards
Deepak

 
Reply With Quote
 
 
 
 
Murali Krishna
Guest
Posts: n/a
 
      07-07-2006

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi All,
>
> I am facing a very unique problem while compling my project in
> "Release" build.
> The project is building in DEBUG mode but giving linking error on
> Release build.
> Here is the error:
> Creating library Release/fnimqcmd.lib and object
> Release/fnimqcmd.exp
> CoIMQCmd.obj : error LNK2001: unresolved external symbol
> "__declspec(dllimport) private: void __thiscall
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> >::_Tidy(unsigned short)"
> (__imp_?_Tidy@?$basic_string@DU?$char_
> traits@D@std@@V?$allocator@D@2@@std@@AAEXG@Z)
> CoIMQCmd.obj : error LNK2001: unresolved external symbol
> "__declspec(dllimport) private: unsigned short __thiscall
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> >::_Grow(unsigned int,unsigned short)"
> (__imp_?_Grow@?
> $basic_string@DU?$char_traits@D@std@@V?$allocator@ D@2@@std@@AAEGIG@Z)
> Release/fnimqcmd.dll : fatal error LNK1120: 2 unresolved externals
> Error executing link.exe.
>
> My project is a MFC extension DLL using "Use MFC in shared DLL". I
> started running into this problem when I have used STL::vector in my
> project. Somehow I feel that this is the cause of the problem but not
> able to locate the reasons.
>
> Furthermore, I am able to compile the project in "Debug"
> confiiguration. In "Release" configuration if we turn off the
> optimization i.e project settings->Optimization-> Disable(Debug) we are
> able to link it successfully.
>
> Following are some more project settings under C/C++ tab->Code
> generation:-
>
> Processor->Blend*
> Use run-time library-> Multithreaded DLL(/MD)
> Calling Conventions -> __cdecl*
>
> My product build is being stucked due to this project so an early
> response would be highly appreciated.
>
> Thanks in advance.
>
> Regards
> Deepak


Hi Deepak, this is not an MFC Group. You can get better answers in

microsoft.public.vc.mfc (you have already posted)

how ever, settings for debug mode and release mode are different.

you would have added a .lib to link in the settings in debug mode.

add the same .lib file in the settings of release mode (in the link
tab).

Plz do not post queries regarding OS, IDEs issues.

-- Murali Krishna

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert from void (__thiscall Phone::* )(pjsua_acc_id) to void (__cdecl *)(pjsua_acc) ahong C++ 0 04-02-2009 10:43 AM
Error: __thiscall CNode::~CNode(void)" (??1CNode@@QAE@XZ) 2005 C++ 2 10-25-2006 04:21 AM
Linking ASN.1 - components in C ++ - error LNK2001- eberesche C++ 5 09-24-2006 07:17 PM
"void Method()" vs "void Method(void)" Ollej Reemt C++ 7 04-22-2005 03:47 AM
`void **' revisited: void *pop(void **root) Stig Brautaset C Programming 15 10-28-2003 09:03 AM



Advertisments