473,320 Members | 1,744 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,320 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 3343
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 hook for a RichEdit box in another application. ...
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 erroneous view of things on my behalf; Lets say I...
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 follows: _AFX_RICHEDIT_STATE* const pEditState...
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 external symbol ___argv nafxcwd.lib(appcore.obj)...
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 from a DLL is not found by another DLL referencing...
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 unresolved externals / linker errors: Error 16 error...
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 under VC++ 7.1. And I get linker errors referring to...
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 skinned control set, I have to use normal ones for...
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 linker errors "multiple definition of ..." if you try...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.