473,403 Members | 2,183 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,403 software developers and data experts.

unresolved external symbol when link with exp lib

JD
Hi,
I am using VS.NET 2003 with MFC7 and I have a link error:
I use a library dll built with VC60 and mfc4.2, I have the export lib and
include file for that library. The dll implements a Document class (CMyDoc).
In the program when I use RUNTIME_CLASS(CMyDoc) to call CreateObject I got a
link error unresolved external symbol:
"public: static struct CRuntimeClass * __stdcall CMyDoc::GetThisClass(void)"
(?GetThisClass@CMyDoc@@SGPAUCRuntimeClass@@XZ).
I can't call CMyDoc::_GetBaseClass() instead, because it is declared
protected.
I changed the program to use _RUNTIME_CLASS(CMyDoc) instead, and I have a
different unresolved external symbol:
"public: static struct CRuntimeClass const CMyDoc::classCMyDoc"
(?classCMyDoc@CMyDoc@@2UCRuntimeClass@@B)
I know that CMyDoc::classCMyDoc is an export in my dll.

The MFC it's getting worst and worst!


Nov 17 '05 #1
1 2991
Hi JD,

You cannot use multiple versions of MFC together in this way. While you can
use multiple versions of the MFC libraries together in one process if you
never pass any MFC objects across DLL boundaries, that is what you are
trying to do here. Neither the object layout, nor the API is compatible
between versions. You will have to rebuild the library with the 7.1 version
of MFC as well.

Ronald Laeremans
Visual C++ team

"JD" <JD@nospam> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,
I am using VS.NET 2003 with MFC7 and I have a link error:
I use a library dll built with VC60 and mfc4.2, I have the export lib and
include file for that library. The dll implements a Document class
(CMyDoc).
In the program when I use RUNTIME_CLASS(CMyDoc) to call CreateObject I got
a
link error unresolved external symbol:
"public: static struct CRuntimeClass * __stdcall
CMyDoc::GetThisClass(void)"
(?GetThisClass@CMyDoc@@SGPAUCRuntimeClass@@XZ).
I can't call CMyDoc::_GetBaseClass() instead, because it is declared
protected.
I changed the program to use _RUNTIME_CLASS(CMyDoc) instead, and I have a
different unresolved external symbol:
"public: static struct CRuntimeClass const CMyDoc::classCMyDoc"
(?classCMyDoc@CMyDoc@@2UCRuntimeClass@@B)
I know that CMyDoc::classCMyDoc is an export in my dll.

The MFC it's getting worst and worst!

Nov 17 '05 #2

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

Similar topics

3
by: We need more power captain | last post by:
Hi, I know less than a noob, I've been asked to do some compiles in VC++ 6 without knowing too much at all. (I'm a COBOL program normally so this is all too much for me) I open VC++6, open...
2
by: Freddy | last post by:
I am not an experienced programmer, but I had a VC++ program I am trying to eliminate all the VC++ commands from it...and keeping it as a normal C/C++ program......I guess I have succeeded so far,...
5
by: cschettle | last post by:
I think you need to link with msvcrt.lib ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
2
by: Maydogg6 | last post by:
I need a hand with some stubborn link errors. I'm trying to recreate and old program from 6.0 into .NET, but for some reason when I try to compile I'm getting linking errors for all my function...
6
by: sadegh | last post by:
Hi I have a problem with my program in VC++6 When I compile it, the following errors are listed. I spend a lot of time on the groups.google.com to find its reason, but none of comments could...
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...
0
by: bonnielym84 | last post by:
Im new here and im not sure whether is this the right place for me to post my question..anyway..hope that you can help me..i have been stucked in this problem since last wk..My problem is..I'm using...
0
by: Ryan Gaffuri | last post by:
hlink72@hotmail.com (Eric) wrote in message news:<ab8d8b14.0308220550.54fb5f22@posting.google.com>... LNK1120 is a standard C++ error. you using Visual C++? Means your references a class that...
2
by: =?Utf-8?B?YmFzaA==?= | last post by:
Hello, I am compiling a CPP code using Visual studion .net 2003. I get the following error, despite having windldap.h and wldap32.dll in my include and lib paths. Here is the error. uuid.lib...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.