472,325 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Linker errors in VC7 when using RichEdit view

VC++ .NET 2003 Standard Edition
Win XP, SP2

Hi,

I have a code that builds under VC6.0, but fails to link in VC7.1.

The offending code is as follows:

_AFX_RICHEDIT_STATE* const pEditState = _afxRichEditState;

The linker errors are:

----------------------

LVBaseDetailsView.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) class CProcessLocal<class _AFX_RICHEDIT_STATE>
_afxRichEditState"
(__imp_?_afxRichEditState@@3V?$CProcessLocal@V_AFX _RICHEDIT_STATE@@@@A)

LVBaseDetailsView.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall _AFX_EDIT_STATE::~_AFX_EDIT_STATE(void)"
(??1_AFX_EDIT_STATE@@UAE@XZ) referenced in function $L153022

LVBaseDetailsView.obj : error LNK2019: unresolved external symbol "public:
__thiscall _AFX_EDIT_STATE::_AFX_EDIT_STATE(void)"
(??0_AFX_EDIT_STATE@@QAE@XZ) referenced in function "public: static class
CNoTrackObject * __stdcall CProcessLocal<class
_AFX_RICHEDIT_STATE>::CreateObject(void)"
(?CreateObject@?$CProcessLocal@V_AFX_RICHEDIT_STAT E@@@@SGPAVCNoTrackObject@@XZ)

LVBaseDetailsView.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall _AFX_RICHEDIT_STATE::~_AFX_RICHEDIT_STATE(void)"
(??1_AFX_RICHEDIT_STATE@@UAE@XZ) referenced in function "public: virtual
void * __thiscall _AFX_RICHEDIT_STATE::`scalar deleting destructor'(unsigned
int)" (??_G_AFX_RICHEDIT_STATE@@UAEPAXI@Z)

----------------------

The code above is part of legacy code, which I am porting to the .NET
compiler. I cannot drastically change the code to do away with such things
since I saw in the code documentation that this was introduced to solve some
bug where the code crashes if a find dialog is opened in a RichEdit view.
When I searched MSDN / Google I found very little information regarding
this. Later I realized it may be because _afxRichEditState is an
undocumented class, derived from the undocumented CNoTrackObject.

Does anyone know of this problem and a solution to this?
Should I link to some library explicitly in VC7 .NET?

Warm regards,
Sena
Nov 17 '05 #1
2 3248
Ted
Unfortunately those symbols are no longer exported in the release version of
MFC71.DLL. They are only exported in the debug versions. I'm not sure if
this was an oversight on Microsoft's part or whether it was by design.

To verify this, you can do a "find in files" of afxRichEditState in the DEF
files in the installation folders. Notice under VC6.0 it shows up under
both the debug and release DEF files. Under 7.1 it only shows in the debug
DEF files.

The fix you talked about is already fixed in VC7.1, so maybe you could
change your code back to using the standard rich edit control, and not your
own copy. Or to properly fix the problem, bring in all the definitions of
the classes you need (copy them in)

Ted.

"Senapathy" <Se***************@siemens.com> wrote in message
news:d9**********@news.mch.sbs.de...
VC++ .NET 2003 Standard Edition
Win XP, SP2

Hi,

I have a code that builds under VC6.0, but fails to link in VC7.1.

The offending code is as follows:

_AFX_RICHEDIT_STATE* const pEditState = _afxRichEditState;

The linker errors are:

----------------------

LVBaseDetailsView.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) class CProcessLocal<class _AFX_RICHEDIT_STATE>
_afxRichEditState"
(__imp_?_afxRichEditState@@3V?$CProcessLocal@V_AFX _RICHEDIT_STATE@@@@A)

LVBaseDetailsView.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall _AFX_EDIT_STATE::~_AFX_EDIT_STATE(void)"
(??1_AFX_EDIT_STATE@@UAE@XZ) referenced in function $L153022

LVBaseDetailsView.obj : error LNK2019: unresolved external symbol "public:
__thiscall _AFX_EDIT_STATE::_AFX_EDIT_STATE(void)"
(??0_AFX_EDIT_STATE@@QAE@XZ) referenced in function "public: static class
CNoTrackObject * __stdcall CProcessLocal<class
_AFX_RICHEDIT_STATE>::CreateObject(void)"
(?CreateObject@?$CProcessLocal@V_AFX_RICHEDIT_STAT E@@@@SGPAVCNoTrackObject@@XZ)

LVBaseDetailsView.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall _AFX_RICHEDIT_STATE::~_AFX_RICHEDIT_STATE(void)"
(??1_AFX_RICHEDIT_STATE@@UAE@XZ) referenced in function "public: virtual
void * __thiscall _AFX_RICHEDIT_STATE::`scalar deleting
destructor'(unsigned int)" (??_G_AFX_RICHEDIT_STATE@@UAEPAXI@Z)

----------------------

The code above is part of legacy code, which I am porting to the .NET
compiler. I cannot drastically change the code to do away with such things
since I saw in the code documentation that this was introduced to solve
some bug where the code crashes if a find dialog is opened in a RichEdit
view.
When I searched MSDN / Google I found very little information regarding
this. Later I realized it may be because _afxRichEditState is an
undocumented class, derived from the undocumented CNoTrackObject.

Does anyone know of this problem and a solution to this?
Should I link to some library explicitly in VC7 .NET?

Warm regards,
Sena

Nov 17 '05 #2
Hi Ted,

Thanks for the info ! I too finally resorted to commenting out the offending
code to get it built, but didn't know if it was alright.
Can you point out for me if it is documented somewhere that the original bug
in RichEdit view is fixed in VC7.1?
( just to appease the Q guys if they ask how I can comment out code
arbitrarily during porting to .NET compiler! )

Regards,
Sena

"Ted" <te*@t--x.org> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
Unfortunately those symbols are no longer exported in the release version
of MFC71.DLL. They are only exported in the debug versions. I'm not
sure if this was an oversight on Microsoft's part or whether it was by
design.

To verify this, you can do a "find in files" of afxRichEditState in the
DEF files in the installation folders. Notice under VC6.0 it shows up
under both the debug and release DEF files. Under 7.1 it only shows in
the debug DEF files.

The fix you talked about is already fixed in VC7.1, so maybe you could
change your code back to using the standard rich edit control, and not
your own copy. Or to properly fix the problem, bring in all the
definitions of the classes you need (copy them in)

Ted.

"Senapathy" <Se***************@siemens.com> wrote in message
news:d9**********@news.mch.sbs.de...
VC++ .NET 2003 Standard Edition
Win XP, SP2

Hi,

I have a code that builds under VC6.0, but fails to link in VC7.1.

The offending code is as follows:

_AFX_RICHEDIT_STATE* const pEditState = _afxRichEditState;

The linker errors are:

----------------------

LVBaseDetailsView.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) class CProcessLocal<class _AFX_RICHEDIT_STATE>
_afxRichEditState"
(__imp_?_afxRichEditState@@3V?$CProcessLocal@V_AFX _RICHEDIT_STATE@@@@A)

LVBaseDetailsView.obj : error LNK2019: unresolved external symbol
"public: virtual __thiscall _AFX_EDIT_STATE::~_AFX_EDIT_STATE(void)"
(??1_AFX_EDIT_STATE@@UAE@XZ) referenced in function $L153022

LVBaseDetailsView.obj : error LNK2019: unresolved external symbol
"public: __thiscall _AFX_EDIT_STATE::_AFX_EDIT_STATE(void)"
(??0_AFX_EDIT_STATE@@QAE@XZ) referenced in function "public: static class
CNoTrackObject * __stdcall CProcessLocal<class
_AFX_RICHEDIT_STATE>::CreateObject(void)"
(?CreateObject@?$CProcessLocal@V_AFX_RICHEDIT_STAT E@@@@SGPAVCNoTrackObject@@XZ)

LVBaseDetailsView.obj : error LNK2019: unresolved external symbol
"public: virtual __thiscall
_AFX_RICHEDIT_STATE::~_AFX_RICHEDIT_STATE(void)"
(??1_AFX_RICHEDIT_STATE@@UAE@XZ) referenced in function "public: virtual
void * __thiscall _AFX_RICHEDIT_STATE::`scalar deleting
destructor'(unsigned int)" (??_G_AFX_RICHEDIT_STATE@@UAEPAXI@Z)

----------------------

The code above is part of legacy code, which I am porting to the .NET
compiler. I cannot drastically change the code to do away with such
things since I saw in the code documentation that this was introduced to
solve some bug where the code crashes if a find dialog is opened in a
RichEdit view.
When I searched MSDN / Google I found very little information regarding
this. Later I realized it may be because _afxRichEditState is an
undocumented class, derived from the undocumented CNoTrackObject.

Does anyone know of this problem and a solution to this?
Should I link to some library explicitly in VC7 .NET?

Warm regards,
Sena


Nov 17 '05 #3

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

Similar topics

5
by: murlbrown | last post by:
I am using a class library built by michael kennedy that creates a system wide hook on the WH_KEYBOARD_LL, but I wanted to changed it to become a...
3
by: Grahamo | last post by:
Hi, I have a question that pertains to Templates and link time. This is totally for my own understanding and to correct what's obviously an...
4
by: Senapathy | last post by:
VC++ .NET 2003 Standard Edition Win XP, SP2 Hi, I have a code that builds under VC6.0, but fails to link in VC7.1. The offending code is as...
3
by: ac2806 | last post by:
Hi I want to use the static MFC within a dll, but I get the following errors when linking: nafxcwd.lib(appcore.obj) : error LNK2001: unresolved...
3
by: ralphsieminsky | last post by:
A project compiles fine under VS 2005 RC without the /clr option. However, when /clr is turned on several errors appear: - A symbol exported...
3
by: Chucker | last post by:
Hi Folks, I got a Wrapper Dll around a native C++ static library. In .NET 1.1 this worked fine. When moving to .NET 2.0 I get a couple of...
0
by: VivekR | last post by:
I have a MFC application developed using VC++ 5. Recently I ported that to VC++ 7.1 and now I am trying to compile the MFC application with /CLR...
1
by: Claire | last post by:
I'm writing an application with custom skinned controls. I have a text editor form with a rich edit control. Because there's no toolbuttons in the...
2
by: Markus Dehmann | last post by:
What to do if an external library is header-files-only (but you have to use it), and you get lots of linker errors? You will necessarily get...
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...

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.