473,386 Members | 1,694 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,386 software developers and data experts.

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_

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

Jul 7 '06 #1
1 7267

sh************@gmail.com 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

Jul 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Kevin Grigorenko | last post by:
Okay, everything seems simple enough but I get the following Link error: TeXt.obj : error LNK2001: unresolved external symbol "private: static char * TextDB::TextDB::myVersion"...
1
by: yanwan | last post by:
Hello I met some problems in linking a project, and hope someone can give me some advice. -----------Configuration: lighting - Win32 Release-------------------- Linking... LINK : warning...
3
by: tomrmgc | last post by:
I have some code that compiles and links fine in VC6 but does not link in VC7. Here are the relevant parts of the code: class AView : public CScrollView { .... public: AFX_DISPMAP_ENTRY*...
4
by: Sanjay Kumar | last post by:
Folks ! I am working with VC++ after a long time and having problem linking latest xerces 2.7 in VC++ 2005 Express Edition. I have done following: 1. downloaded and unpacked the the...
5
by: bonnielym84 | last post by:
Im new here..didnt noe whether is this the rite way to post my problem..Really need help here..i've been stucked in this error from last wk..My problem is like this..Im using VC++ 6.0 to compile my C...
2
by: silverleaf | last post by:
I've compiled two identical source codes. #1 has no problems and came with a programming book that I bought. #2, my copy and paste from #1 as a test and to eliminate as many possible error sources as...
1
by: tomb | last post by:
I haven't worked with Visual C++ before, so I'm in a little over my head on a project I'm doing. I'm using VC++ 2003 unmanaged code, and I am getting this linking error that I don't understand:...
1
by: kanmanideepa | last post by:
when I compiling the C program ,I get linking error : Undefined symbol in _module c0 This is my program I need your help typedef unsigned char Byte; #include <stdio.h> #include<conio.h>...
2
by: randa zaghdan | last post by:
Hi I have a problem with my program in vc 2008 When I compile it, the following errors are listed. I try to resolve it but no hope Does any one can help me ? thanks . Linking......
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.