473,545 Members | 1,995 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 3372
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
4731
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
1744
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
2409
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
7478
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
7410
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7668
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7923
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
7437
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
7773
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5343
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
4960
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
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.