473,554 Members | 3,102 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_S TATE* const pEditState = _afxRichEditSta te;

The linker errors are:

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

LVBaseDetailsVi ew.obj : error LNK2001: unresolved external symbol
"__declspec(dll import) class CProcessLocal<c lass _AFX_RICHEDIT_S TATE>
_afxRichEditSta te"
(__imp_?_afxRic hEditState@@3V? $CProcessLocal@ V_AFX_RICHEDIT_ STATE@@@@A)

LVBaseDetailsVi ew.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall _AFX_EDIT_STATE ::~_AFX_EDIT_ST ATE(void)"
(??1_AFX_EDIT_S TATE@@UAE@XZ) referenced in function $L153022

LVBaseDetailsVi ew.obj : error LNK2019: unresolved external symbol "public:
__thiscall _AFX_EDIT_STATE ::_AFX_EDIT_STA TE(void)"
(??0_AFX_EDIT_S TATE@@QAE@XZ) referenced in function "public: static class
CNoTrackObject * __stdcall CProcessLocal<c lass
_AFX_RICHEDIT_S TATE>::CreateOb ject(void)"
(?CreateObject@ ?$CProcessLocal @V_AFX_RICHEDIT _STATE@@@@SGPAV CNoTrackObject@ @XZ)

LVBaseDetailsVi ew.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall _AFX_RICHEDIT_S TATE::~_AFX_RIC HEDIT_STATE(voi d)"
(??1_AFX_RICHED IT_STATE@@UAE@X Z) referenced in function "public: virtual
void * __thiscall _AFX_RICHEDIT_S TATE::`scalar deleting destructor'(uns igned
int)" (??_G_AFX_RICHE DIT_STATE@@UAEP AXI@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 _afxRichEditSta te 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 3377
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 afxRichEditStat e 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_S TATE* const pEditState = _afxRichEditSta te;

The linker errors are:

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

LVBaseDetailsVi ew.obj : error LNK2001: unresolved external symbol
"__declspec(dll import) class CProcessLocal<c lass _AFX_RICHEDIT_S TATE>
_afxRichEditSta te"
(__imp_?_afxRic hEditState@@3V? $CProcessLocal@ V_AFX_RICHEDIT_ STATE@@@@A)

LVBaseDetailsVi ew.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall _AFX_EDIT_STATE ::~_AFX_EDIT_ST ATE(void)"
(??1_AFX_EDIT_S TATE@@UAE@XZ) referenced in function $L153022

LVBaseDetailsVi ew.obj : error LNK2019: unresolved external symbol "public:
__thiscall _AFX_EDIT_STATE ::_AFX_EDIT_STA TE(void)"
(??0_AFX_EDIT_S TATE@@QAE@XZ) referenced in function "public: static class
CNoTrackObject * __stdcall CProcessLocal<c lass
_AFX_RICHEDIT_S TATE>::CreateOb ject(void)"
(?CreateObject@ ?$CProcessLocal @V_AFX_RICHEDIT _STATE@@@@SGPAV CNoTrackObject@ @XZ)

LVBaseDetailsVi ew.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall _AFX_RICHEDIT_S TATE::~_AFX_RIC HEDIT_STATE(voi d)"
(??1_AFX_RICHED IT_STATE@@UAE@X Z) referenced in function "public: virtual
void * __thiscall _AFX_RICHEDIT_S TATE::`scalar deleting
destructor'(uns igned int)" (??_G_AFX_RICHE DIT_STATE@@UAEP AXI@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 _afxRichEditSta te 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******** *******@TK2MSFT NGP10.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 afxRichEditStat e 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_S TATE* const pEditState = _afxRichEditSta te;

The linker errors are:

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

LVBaseDetailsVi ew.obj : error LNK2001: unresolved external symbol
"__declspec(dll import) class CProcessLocal<c lass _AFX_RICHEDIT_S TATE>
_afxRichEditSta te"
(__imp_?_afxRic hEditState@@3V? $CProcessLocal@ V_AFX_RICHEDIT_ STATE@@@@A)

LVBaseDetailsVi ew.obj : error LNK2019: unresolved external symbol
"public: virtual __thiscall _AFX_EDIT_STATE ::~_AFX_EDIT_ST ATE(void)"
(??1_AFX_EDIT_S TATE@@UAE@XZ) referenced in function $L153022

LVBaseDetailsVi ew.obj : error LNK2019: unresolved external symbol
"public: __thiscall _AFX_EDIT_STATE ::_AFX_EDIT_STA TE(void)"
(??0_AFX_EDIT_S TATE@@QAE@XZ) referenced in function "public: static class
CNoTrackObject * __stdcall CProcessLocal<c lass
_AFX_RICHEDIT_S TATE>::CreateOb ject(void)"
(?CreateObject@ ?$CProcessLocal @V_AFX_RICHEDIT _STATE@@@@SGPAV CNoTrackObject@ @XZ)

LVBaseDetailsVi ew.obj : error LNK2019: unresolved external symbol
"public: virtual __thiscall
_AFX_RICHEDIT_S TATE::~_AFX_RIC HEDIT_STATE(voi d)"
(??1_AFX_RICHED IT_STATE@@UAE@X Z) referenced in function "public: virtual
void * __thiscall _AFX_RICHEDIT_S TATE::`scalar deleting
destructor'(uns igned int)" (??_G_AFX_RICHE DIT_STATE@@UAEP AXI@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 _afxRichEditSta te 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
4732
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. I modified the class keeping a majority of his code, and built a c#(.net) front end to use this c++ built core library, passing it the hook type of...
3
1651
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 have; // main.cpp
4
276
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 = _afxRichEditState;
3
8103
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) : error LNK2001: unresolved external symbol ___argc nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
3
3276
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 it. The name of the symbol present in the DLL, as shown by depends.exe is ?Apply@ScreenContext@@SGPAV1@PAUHWND__@@@Z But the name of the symbol...
3
8048
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 LNK2028: unresolved token (0A000007) "extern "C" void __clrcall ___CxxCallUnwindDtor(void (__clrcall*)(void *),void *)"...
0
1745
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 one of the libraries that the project uses. Without the /CLR, the project compiles and runs well. There is some library by name task.lib and the...
1
2217
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 Bold/Italic/Underline etc. Because they're normal buttons, they grab focus from the rich edit. So to prevent losing the caret Ive used the...
2
2410
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 to separate interface from implementation in your own code. The external-library symbols will first be defined in one .o file and then again in the...
0
7596
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8039
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7560
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6140
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5152
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3556
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3545
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1130
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.