473,729 Members | 2,042 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 3388
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
4758
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 EM_SETTEXTEX (WM_USER + 97) and the threadID of the richedit box, his class comes up telling me...
3
1658
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
8113
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
3297
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 the linker looks for when
3
8078
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 *)" (?___CxxCallUnwindDtor@@$$J0YMXP6MXPAX@Z0@Z) referenced in function "public: virtual __thiscall...
0
1754
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 code refers to that lib, in the linker step i get the following linker errors:- Task.lib :...
1
2225
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 Validating event to cancel focus loss. This works great. The application can be run in either terminal or...
2
2429
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 next one that includes the same implementation-heavy header. Is there any way to avoid the...
0
8766
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9428
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9158
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8160
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4799
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3244
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2698
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2171
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.