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

CString link error in VC7 with MFC extersion dll which export functions using CString as parameter

Hi,
I run into a cstring related link problem in VC7.
My solution has 3 projects, one MFC exe, two MFC extersion DLL.
the two MFC extersion DLL export functions which use CString as
parameters.
Everything is fine in VC6.
Now I want to upgrade the solution to VC7, but I got lots of link error
like this,
/*
WinGPC5.obj : error LNK2019: unresolved external symbol "public: static
void __cdecl CHelp::SetHelpPath(class ATL::CStringT<unsigned
short,class StrTraitMFC<unsigned short,class ATL::ChTraitsCRT<unsigned
short const &)"
(?SetHelpPath@CHelp@@SAXABV?$CStringT@GV?$StrTrait MFC@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@@Z)
referenced in function "public: virtual int __thiscall
CWinGPC5App::InitInstance(void)" (?InitInstance@CWinGPC5App@@UAEHXZ)
LadderFrame.obj : error LNK2001: unresolved external symbol "public:
virtual class ATL::CStringT<unsigned short,class StrTraitMFC<unsigned
short,class ATL::ChTraitsCRT<unsigned short __thiscall
CBCGPMDIChildWnd::GetFrameText(void)const "
(?GetFrameText@CBCGPMDIChildWnd@@UBE?AV?$CStringT@ GV?$StrTraitMFC@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@XZ)
*/
Some exported function which use CString as parameter can't be found.
If I change the parameter from CString to int for testing, it's ok.

I searched on web and find Q309801 by MS, but it doesn't help(it's for
CString derived class, not exported functions with CString parameters.)
Maybe I didn't fully follow its steps.

On the web, there's someone esle has the same problem as I do:
http://groups-beta.google.com/group/...81653?hl=en-us

Has MS be awared of this?

Dec 1 '06 #1
2 5437
Did you recompile everything with VC7? You CANNOT mix MFC Dlls from VC6
and VC7 (and the error you are getting says it can't find a VC7 CString
function - sounds like your Dlls are still VC6)
Bob
<fl******@gmail.comwrote in message
news:11**********************@n67g2000cwd.googlegr oups.com...
Hi,
I run into a cstring related link problem in VC7.
My solution has 3 projects, one MFC exe, two MFC extersion DLL.
the two MFC extersion DLL export functions which use CString as
parameters.
Everything is fine in VC6.
Now I want to upgrade the solution to VC7, but I got lots of link error
like this,
/*
WinGPC5.obj : error LNK2019: unresolved external symbol "public: static
void __cdecl CHelp::SetHelpPath(class ATL::CStringT<unsigned
short,class StrTraitMFC<unsigned short,class ATL::ChTraitsCRT<unsigned
short const &)"
(?SetHelpPath@CHelp@@SAXABV?$CStringT@GV?$StrTrait MFC@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@@Z)
referenced in function "public: virtual int __thiscall
CWinGPC5App::InitInstance(void)" (?InitInstance@CWinGPC5App@@UAEHXZ)
LadderFrame.obj : error LNK2001: unresolved external symbol "public:
virtual class ATL::CStringT<unsigned short,class StrTraitMFC<unsigned
short,class ATL::ChTraitsCRT<unsigned short __thiscall
CBCGPMDIChildWnd::GetFrameText(void)const "
(?GetFrameText@CBCGPMDIChildWnd@@UBE?AV?$CStringT@ GV?$StrTraitMFC@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@XZ)
*/
Some exported function which use CString as parameter can't be found.
If I change the parameter from CString to int for testing, it's ok.

I searched on web and find Q309801 by MS, but it doesn't help(it's for
CString derived class, not exported functions with CString parameters.)
Maybe I didn't fully follow its steps.

On the web, there's someone esle has the same problem as I do:
http://groups-beta.google.com/group/...81653?hl=en-us

Has MS be awared of this?

Dec 1 '06 #2
Yes, I think I tried 'rebuild all' several times.
Even I create a totally new solution in VC7 with one MFC exe, and one MFC
extersion dll which export function with cstring parameter, I still get that
link error.

"Bob Milton" wrote:
Did you recompile everything with VC7? You CANNOT mix MFC Dlls from VC6
and VC7 (and the error you are getting says it can't find a VC7 CString
function - sounds like your Dlls are still VC6)
Bob
Dec 2 '06 #3

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

Similar topics

9
by: Fausto Lopez | last post by:
I'm getting the following error: 'strlen' : cannot convert parameter 1 from 'class CString' to 'const char *' when I try to compile the following code: HRESULT AnsiToUnicode(CString pszA,...
14
by: Steve McLellan | last post by:
Hi, Sorry to repost, but this is becoming aggravating, and causing me a lot of wasted time. I've got a reasonably large mixed C++ project, and after a number of builds (but not a constant...
0
by: Silly | last post by:
I am writing a MC++ wrapper for a native dll, that will be called by C# applications. One of the functions returns a CString parameter: long GetProductStringDescriptor(int DevID, CString&...
0
by: npotnis | last post by:
Hi All, I am trying to compile an existing C++ unamanaged application with the /clr switch in VS.Net 2003, as I need to use managed extensions in the code. In a cpp file I have the following...
4
by: huguogang | last post by:
Just curious, any one know what the 3 part parameter "class CString filename" would mean. The code: int TestFunc(class CString filename) { fopen(filename, "w"); } Compile using Visaul C++,...
4
by: Susan Rice | last post by:
I'm new to using CString. Why won't the following compile? I'm using Microsoft Visual C++ 6.0 Line 37 which it complains about is the function: 37 CString ConvertFile(char *szFileName) I...
4
by: sreenubkaimal | last post by:
Please help me with this.. I have a DLL created in Visual C++ 6.0 ( VS 6.0 ). I am trying to use this DLL in a new wrapper application written using Visual Studio .net 2003 (C++ - MFC). My...
16
by: Norman Diamond | last post by:
In an antique obsolete version of MFC, a CString expression could be subscripted in order to retrieve one element. Visual Studio 2005 defines CSimpleStringT::operator. At first glance it looks...
4
by: sebastian.dau | last post by:
Hello Newsgroup, I have a link error that I did not manage to fix. I basically consume a VC 8.0 C++ dll that exports a class with a method containing CString declaration as follows: class...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.