473,289 Members | 2,106 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,289 software developers and data experts.

Issues with Porting VS6.0 MFC Projects to VS8.0 - Need Help

I am in the midst of porting a massive MFC application from VS6.0 to VS8.0.
While i have fixed most of the compile time errors, i do have quite a linker
error that i have not been able to resolve. The error i get is

Error 100 error LNK2001: unresolved external symbol "public: virtual void
__thiscall CWnd::PostNcDestroy(void)"
(?PostNcDestroy@CWnd@@UAEXXZ) Evenout.obj

I have about 200 of these on almost all the obj's that have a dialog in
them(which is understandable). But i do see that the delcaration of
CWnd::PostNcDestory( ) in the systems afxwin.h header which is public:

// for custom cleanup after WM_NCDESTROY
public:
virtual void PostNcDestroy();

Do i need to refer to any particular version of SDK/ *.lib or am i missing
something. Any help here would be appreciated.
Aug 4 '06 #1
5 3244
"BK-Chicago" <BK*******@discussions.microsoft.comwrote in message
news:89**********************************@microsof t.com...
>I am in the midst of porting a massive MFC application from VS6.0 to VS8.0.
While i have fixed most of the compile time errors, i do have quite a
linker
error that i have not been able to resolve. The error i get is

Error 100 error LNK2001: unresolved external symbol "public: virtual void
__thiscall CWnd::PostNcDestroy(void)"
(?PostNcDestroy@CWnd@@UAEXXZ) Evenout.obj

I have about 200 of these on almost all the obj's that have a dialog in
them(which is understandable). But i do see that the delcaration of
CWnd::PostNcDestory( ) in the systems afxwin.h header which is public:

// for custom cleanup after WM_NCDESTROY
public:
virtual void PostNcDestroy();

Do i need to refer to any particular version of SDK/ *.lib or am i
missing
something. Any help here would be appreciated.
Make sure that you're not still linking against the VC6 version of MFC.
Check the project settings and the Tools|Options|Projects and Solutions|C++
Directories to make sure that the VS2005 directories are the only ones on
the library search path.

-cd
Aug 4 '06 #2
Thank you for looking into this.

This is what i have set in the Tools Option category.

<ToolsOptionsSubCategory name="VCDirectories"
RegisteredName="VCDirectories" PackageName="Visual C++ Project System
Package">
<PropertyValue
name="LibraryDirectories">Win32|$(VCInstallDir)lib ;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)atlmfc\l ib\i386;$(VCInstallDir)PlatformSDK\lib;$(Framework SDKDir)lib;$(VSInstallDir);$(VSInstallDir)lib|x64| $(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib \amd64;$(VCInstallDir)PlatformSDK\lib\amd64;$(VSIn stallDir)SDK\v2.0\lib\amd64|Pocket
PC 2003
(ARMV4)|$(VSInstallDir)SmartDevices\SDK\PocketPC20 03\lib\ARMV4;$(VCInstallDir)ce\atlmfc\lib\ARMV4;$( VCInstallDir)ce\lib\ARMV4;|Smartphone
2003
(ARMV4)|$(VSInstallDir)SmartDevices\SDK\SmartPhone 2003\lib\ARMV4;$(VCInstallDir)ce\atlmfc\lib\ARMV4; $(VCInstallDir)ce\lib\ARMV4;</PropertyValue>
<PropertyValue
name="ReferenceDirectories">Win32|$(FrameworkDir)$ (FrameworkVersion);$(VCInstallDir)atlmfc\lib|x64|$ (FrameworkDir)$(FrameworkVersion);$(VCInstallDir)a tlmfc\lib\amd64|Pocket PC 2003 (ARMV4)||Smartphone 2003 (ARMV4)|</PropertyValue>
<PropertyValue
name="ExcludeDirectories">Win32|$(VCInstallDir)inc lude;$(VCInstallDir)atlmfc\include;$(VCInstallDir) PlatformSDK\include;$(FrameworkSDKDir)include;$(Fr ameworkDir)$(FrameworkVersion);$(VCInstallDir)atlm fc\lib|x64|$(VCInstallDir)include;$(VCInstallDir)a tlmfc\include;$(VCInstallDir)PlatformSDK\include;$ (FrameworkSDKDir)include;$(FrameworkDir)$(Framewor kVersion);$(VCInstallDir)atlmfc\lib\amd64|Pocket
PC 2003
(ARMV4)|$(VCInstallDir)ce\include;$(VSInstallDir)S martDevices\SDK\PocketPC2003\include;$(VCInstallDi r)ce\atlmfc\include;$(VSInstallDir)SmartDevices\SD K\SQL
Server\Mobile\v3.0;;|Smartphone 2003
(ARMV4)|$(VCInstallDir)ce\include;$(VSInstallDir)S martDevices\SDK\SmartPhone2003\include;$(VCInstall Dir)ce\atlmfc\include;$(VSInstallDir)SmartDevices\ SDK\SQL Server\Mobile\v3.0;;</PropertyValue>
<PropertyValue
name="IncludeDirectories">Win32|C:\Development\pro jects\Zipl_src;$(VCInstallDir)include;$(VCInstallD ir)atlmfc\include;$(VCInstallDir)PlatformSDK\inclu de;$(FrameworkSDKDir)include|x64|$(VCInstallDir)in clude;$(VCInstallDir)atlmfc\include;$(VCInstallDir )PlatformSDK\include;$(FrameworkSDKDir)include|Poc ket
PC 2003
(ARMV4)|$(VCInstallDir)ce\include;$(VSInstallDir)S martDevices\SDK\PocketPC2003\include;$(VCInstallDi r)ce\atlmfc\include;$(VSInstallDir)SmartDevices\SD K\SQL
Server\Mobile\v3.0;|Smartphone 2003
(ARMV4)|$(VCInstallDir)ce\include;$(VSInstallDir)S martDevices\SDK\SmartPhone2003\include;$(VCInstall Dir)ce\atlmfc\include;$(VSInstallDir)SmartDevices\ SDK\SQL Server\Mobile\v3.0;</PropertyValue>
<PropertyValue
name="SourceDirectories">Win32|$(VCInstallDir)atlm fc\src\mfc;$(VCInstallDir)atlmfc\src\mfcm;$(VCInst allDir)atlmfc\src\atl;$(VCInstallDir)crt\src|x64|$ (VCInstallDir)atlmfc\src\mfc;$(VCInstallDir)atlmfc \src\mfcm;$(VCInstallDir)atlmfc\src\atl;$(VCInstal lDir)crt\src|Pocket
PC 2003
(ARMV4)|$(VCInstallDir)ce\atlmfc\src\atl\;$(VCInst allDir)ce\atlmfc\src\mfc\;$(VCInstallDir)ce\crt\sr c\|Smartphone
2003
(ARMV4)|$(VCInstallDir)ce\atlmfc\src\atl\;$(VCInst allDir)ce\atlmfc\src\mfc\;$(VCInstallDir)ce\crt\sr c\</PropertyValue>
<PropertyValue
name="ExecutableDirectories">Win32|$(VCInstallDir) bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallDir) Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(V SInstallDir)Common7\ide;$(ProgramFiles)\HTML
Help
Workshop;$(FrameworkSDKDir)bin;$(FrameworkDir)$(Fr ameworkVersion);$(VSInstallDir);$(VSInstallDir)\SD K\v2.0\bin;$(SystemRoot)\SysWow64;$(FxCopDir);$(PA TH)|x64|$(VCInstallDir)bin\x86_amd64;$(VCInstallDi r)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallDi r)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$ (VSInstallDir)Common7\ide;$(ProgramFiles)\HTML
Help
Workshop;$(FrameworkSDKDir)bin;$(FrameworkSDKDir)l ib\win64;$(FrameworkDir)$(FrameworkVersion);$(FxCo pDir);$(PATH)|Pocket
PC 2003
(ARMV4)|$(VCInstallDir)ce\bin\x86_arm;$(VCInstallD ir)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallD ir)Common7\Tools;$(VSInstallDir)Common7\IDE;$(VSIn stallDir)Common\Tools;$(VSInstallDir)Common\IDE;$( VSInstallDir);$(FrameworkSDKDir)Bin;$(PATH);|Smart phone
2003
(ARMV4)|$(VCInstallDir)ce\bin\x86_arm;$(VCInstallD ir)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallD ir)Common7\Tools;$(VSInstallDir)Common7\IDE;$(VSIn stallDir)Common\Tools;$(VSInstallDir)Common\IDE;$( VSInstallDir);$(FrameworkSDKDir)Bin;$(PATH);</PropertyValue>
</ToolsOptionsSubCategory>

and i did set an env variable VCInstallDir to the correct path(which i am
hoping would override whatever studio has)

C:\Documents and Settings\User>set VCInstalldir
VCInstallDir=C:\Program Files\Microsoft Visual Studio 8

Am I missing something.

Also want to metion that i do have 2 third party math libraries(*.lib) that
are not built using VS2005. But they do link fine using VS2003 and VS6.00.
Not sure if this should have any effect.

Regards
Bk
"Carl Daniel [VC++ MVP]" wrote:
"BK-Chicago" <BK*******@discussions.microsoft.comwrote in message
news:89**********************************@microsof t.com...
I am in the midst of porting a massive MFC application from VS6.0 to VS8.0.
While i have fixed most of the compile time errors, i do have quite a
linker
error that i have not been able to resolve. The error i get is

Error 100 error LNK2001: unresolved external symbol "public: virtual void
__thiscall CWnd::PostNcDestroy(void)"
(?PostNcDestroy@CWnd@@UAEXXZ) Evenout.obj

I have about 200 of these on almost all the obj's that have a dialog in
them(which is understandable). But i do see that the delcaration of
CWnd::PostNcDestory( ) in the systems afxwin.h header which is public:

// for custom cleanup after WM_NCDESTROY
public:
virtual void PostNcDestroy();

Do i need to refer to any particular version of SDK/ *.lib or am i
missing
something. Any help here would be appreciated.

Make sure that you're not still linking against the VC6 version of MFC.
Check the project settings and the Tools|Options|Projects and Solutions|C++
Directories to make sure that the VS2005 directories are the only ones on
the library search path.

-cd
Aug 4 '06 #3
The issue has been resolved.

The following actions were taken to resolve the issue:
1. VS 2005 was uninstalled
2. Visual Studio .NET2003 was uninstalled
3. VS 2005 was uninstalled
4. A clean rebuild.

Looks like the initial installation order of
VS 6.0
VS 2005
VS.NET2003
throws the env in a form that confuses VS2005.
"BK-Chicago" wrote:
Thank you for looking into this.

This is what i have set in the Tools Option category.

<ToolsOptionsSubCategory name="VCDirectories"
RegisteredName="VCDirectories" PackageName="Visual C++ Project System
Package">
<PropertyValue
name="LibraryDirectories">Win32|$(VCInstallDir)lib ;$(VCInstallDir)atlmfc\lib;$(VCInstallDir)atlmfc\l ib\i386;$(VCInstallDir)PlatformSDK\lib;$(Framework SDKDir)lib;$(VSInstallDir);$(VSInstallDir)lib|x64| $(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib \amd64;$(VCInstallDir)PlatformSDK\lib\amd64;$(VSIn stallDir)SDK\v2.0\lib\amd64|Pocket
PC 2003
(ARMV4)|$(VSInstallDir)SmartDevices\SDK\PocketPC20 03\lib\ARMV4;$(VCInstallDir)ce\atlmfc\lib\ARMV4;$( VCInstallDir)ce\lib\ARMV4;|Smartphone
2003
(ARMV4)|$(VSInstallDir)SmartDevices\SDK\SmartPhone 2003\lib\ARMV4;$(VCInstallDir)ce\atlmfc\lib\ARMV4; $(VCInstallDir)ce\lib\ARMV4;</PropertyValue>
<PropertyValue
name="ReferenceDirectories">Win32|$(FrameworkDir)$ (FrameworkVersion);$(VCInstallDir)atlmfc\lib|x64|$ (FrameworkDir)$(FrameworkVersion);$(VCInstallDir)a tlmfc\lib\amd64|Pocket PC 2003 (ARMV4)||Smartphone 2003 (ARMV4)|</PropertyValue>
<PropertyValue
name="ExcludeDirectories">Win32|$(VCInstallDir)inc lude;$(VCInstallDir)atlmfc\include;$(VCInstallDir) PlatformSDK\include;$(FrameworkSDKDir)include;$(Fr ameworkDir)$(FrameworkVersion);$(VCInstallDir)atlm fc\lib|x64|$(VCInstallDir)include;$(VCInstallDir)a tlmfc\include;$(VCInstallDir)PlatformSDK\include;$ (FrameworkSDKDir)include;$(FrameworkDir)$(Framewor kVersion);$(VCInstallDir)atlmfc\lib\amd64|Pocket
PC 2003
(ARMV4)|$(VCInstallDir)ce\include;$(VSInstallDir)S martDevices\SDK\PocketPC2003\include;$(VCInstallDi r)ce\atlmfc\include;$(VSInstallDir)SmartDevices\SD K\SQL
Server\Mobile\v3.0;;|Smartphone 2003
(ARMV4)|$(VCInstallDir)ce\include;$(VSInstallDir)S martDevices\SDK\SmartPhone2003\include;$(VCInstall Dir)ce\atlmfc\include;$(VSInstallDir)SmartDevices\ SDK\SQL Server\Mobile\v3.0;;</PropertyValue>
<PropertyValue
name="IncludeDirectories">Win32|C:\Development\pro jects\Zipl_src;$(VCInstallDir)include;$(VCInstallD ir)atlmfc\include;$(VCInstallDir)PlatformSDK\inclu de;$(FrameworkSDKDir)include|x64|$(VCInstallDir)in clude;$(VCInstallDir)atlmfc\include;$(VCInstallDir )PlatformSDK\include;$(FrameworkSDKDir)include|Poc ket
PC 2003
(ARMV4)|$(VCInstallDir)ce\include;$(VSInstallDir)S martDevices\SDK\PocketPC2003\include;$(VCInstallDi r)ce\atlmfc\include;$(VSInstallDir)SmartDevices\SD K\SQL
Server\Mobile\v3.0;|Smartphone 2003
(ARMV4)|$(VCInstallDir)ce\include;$(VSInstallDir)S martDevices\SDK\SmartPhone2003\include;$(VCInstall Dir)ce\atlmfc\include;$(VSInstallDir)SmartDevices\ SDK\SQL Server\Mobile\v3.0;</PropertyValue>
<PropertyValue
name="SourceDirectories">Win32|$(VCInstallDir)atlm fc\src\mfc;$(VCInstallDir)atlmfc\src\mfcm;$(VCInst allDir)atlmfc\src\atl;$(VCInstallDir)crt\src|x64|$ (VCInstallDir)atlmfc\src\mfc;$(VCInstallDir)atlmfc \src\mfcm;$(VCInstallDir)atlmfc\src\atl;$(VCInstal lDir)crt\src|Pocket
PC 2003
(ARMV4)|$(VCInstallDir)ce\atlmfc\src\atl\;$(VCInst allDir)ce\atlmfc\src\mfc\;$(VCInstallDir)ce\crt\sr c\|Smartphone
2003
(ARMV4)|$(VCInstallDir)ce\atlmfc\src\atl\;$(VCInst allDir)ce\atlmfc\src\mfc\;$(VCInstallDir)ce\crt\sr c\</PropertyValue>
<PropertyValue
name="ExecutableDirectories">Win32|$(VCInstallDir) bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallDir) Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(V SInstallDir)Common7\ide;$(ProgramFiles)\HTML
Help
Workshop;$(FrameworkSDKDir)bin;$(FrameworkDir)$(Fr ameworkVersion);$(VSInstallDir);$(VSInstallDir)\SD K\v2.0\bin;$(SystemRoot)\SysWow64;$(FxCopDir);$(PA TH)|x64|$(VCInstallDir)bin\x86_amd64;$(VCInstallDi r)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallDi r)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$ (VSInstallDir)Common7\ide;$(ProgramFiles)\HTML
Help
Workshop;$(FrameworkSDKDir)bin;$(FrameworkSDKDir)l ib\win64;$(FrameworkDir)$(FrameworkVersion);$(FxCo pDir);$(PATH)|Pocket
PC 2003
(ARMV4)|$(VCInstallDir)ce\bin\x86_arm;$(VCInstallD ir)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallD ir)Common7\Tools;$(VSInstallDir)Common7\IDE;$(VSIn stallDir)Common\Tools;$(VSInstallDir)Common\IDE;$( VSInstallDir);$(FrameworkSDKDir)Bin;$(PATH);|Smart phone
2003
(ARMV4)|$(VCInstallDir)ce\bin\x86_arm;$(VCInstallD ir)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallD ir)Common7\Tools;$(VSInstallDir)Common7\IDE;$(VSIn stallDir)Common\Tools;$(VSInstallDir)Common\IDE;$( VSInstallDir);$(FrameworkSDKDir)Bin;$(PATH);</PropertyValue>
</ToolsOptionsSubCategory>

and i did set an env variable VCInstallDir to the correct path(which i am
hoping would override whatever studio has)

C:\Documents and Settings\User>set VCInstalldir
VCInstallDir=C:\Program Files\Microsoft Visual Studio 8

Am I missing something.

Also want to metion that i do have 2 third party math libraries(*.lib) that
are not built using VS2005. But they do link fine using VS2003 and VS6.00.
Not sure if this should have any effect.

Regards
Bk
"Carl Daniel [VC++ MVP]" wrote:
"BK-Chicago" <BK*******@discussions.microsoft.comwrote in message
news:89**********************************@microsof t.com...
>I am in the midst of porting a massive MFC application from VS6.0 to VS8.0.
While i have fixed most of the compile time errors, i do have quite a
linker
error that i have not been able to resolve. The error i get is
>
Error 100 error LNK2001: unresolved external symbol "public: virtual void
__thiscall CWnd::PostNcDestroy(void)"
(?PostNcDestroy@CWnd@@UAEXXZ) Evenout.obj
>
I have about 200 of these on almost all the obj's that have a dialog in
them(which is understandable). But i do see that the delcaration of
CWnd::PostNcDestory( ) in the systems afxwin.h header which is public:
>
// for custom cleanup after WM_NCDESTROY
public:
virtual void PostNcDestroy();
>
Do i need to refer to any particular version of SDK/ *.lib or am i
missing
something. Any help here would be appreciated.
Make sure that you're not still linking against the VC6 version of MFC.
Check the project settings and the Tools|Options|Projects and Solutions|C++
Directories to make sure that the VS2005 directories are the only ones on
the library search path.

-cd

Aug 16 '06 #4

"BK-Chicago" <BK*******@discussions.microsoft.comwrote in message
news:FA**********************************@microsof t.com...
The issue has been resolved.

The following actions were taken to resolve the issue:
1. VS 2005 was uninstalled
2. Visual Studio .NET2003 was uninstalled
3. VS 2005 was uninstalled
I assume you meant reinstalled...
4. A clean rebuild.

Looks like the initial installation order of
VS 6.0
VS 2005
VS.NET2003
throws the env in a form that confuses VS2005.
That's not shocking. It's probably always best to install in order of
release date...

-cd
Aug 17 '06 #5
Yep!!.. So here are the steps..
1. VS 2005 was uninstalled
2. Visual Studio .NET2003 was uninstalled
3. VS 2005 was re-installed

"Carl Daniel [VC++ MVP]" wrote:
>
"BK-Chicago" <BK*******@discussions.microsoft.comwrote in message
news:FA**********************************@microsof t.com...
The issue has been resolved.

The following actions were taken to resolve the issue:
1. VS 2005 was uninstalled
2. Visual Studio .NET2003 was uninstalled
3. VS 2005 was uninstalled

I assume you meant reinstalled...
4. A clean rebuild.

Looks like the initial installation order of
VS 6.0
VS 2005
VS.NET2003
throws the env in a form that confuses VS2005.

That's not shocking. It's probably always best to install in order of
release date...

-cd
Aug 17 '06 #6

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

Similar topics

4
by: Chris Travers | last post by:
Hi all; A few years ago, I set about porting a PHP application from MySQL to PostgreSQL, after realizing that MySQL wasn't going to be able to handle it. In order to do this, I built a light,...
0
by: P Reddy | last post by:
Hi All, Greetings!!! I have a question. Please respond.... I am trying to write a C# component that need to inherit some of the the interfaces from unmanged code(VC). I think one way to...
1
by: Ted | last post by:
I managed to get it installed OK, along side MS Visual Studio 2005 (with which I received it). During the install, I made sure I installed everything. I have developed a number of applications...
2
by: sandip desale | last post by:
Dear All, We have a Tcl/Tk application written using Python 2.2. Using this application we want to call some customizable Java APIs. I tried porting Tcl/Tk application to Jython but not able to do...
34
by: subramanian100in | last post by:
Is there any difference between porting and migrating. Kindly explain
5
by: shobhah | last post by:
Hi, We have a complete succsssfully working product on 32bit sparc solaris machine for which compiler used is CC 5.8 Now we are migarting our product from 32 bit to 64bit sparc solaris machine....
133
by: Jean-Pierre Mestre | last post by:
Good evening, I have a C software for Windows that I need to port to Redhat Unix. At the moment it works completely fine with the Windows FLOSS compiler lccwin32. I try gcc but now it doesn't...
0
by: viren.chaudhary2008 | last post by:
I have just few questions. We are thinking of porting our 32 bit application to 64 bit as we need to use more memory usage and want to take advantage of 64 bit processor. Currently my applications...
1
by: viren.chaudhary2008 | last post by:
I have just few questions. We are thinking of porting our 32 bit application to 64 bit as we need to use more memory usage and want to take advantage of 64 bit processor. Currently my applications...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
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: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...

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.