Solved

Converting from Visual C++ 6 to VisualStudio 2005

Posted on 2006-11-03
5
929 Views
Last Modified: 2013-12-03
Hello out there,

I converted a project in which MFC library used from Visual C++ 6.0 to VisualStudio 2005. MFC libraries are used as DLLs.
The produced exe file runs fine on the development machine and one other PC.
On other machines under WinXP I get a message that says something in german similar to "the program istn't installed correctly, please re-install".
On Windows 2000 I get the clear message that mfc80.dll is missing. After copying mfc80.dll and msvcr80.dll into the program's directory it says COREDLL.DLL not found. But this library is only for Windows CE and doesn't even exist on the machine where the program can run correctly...

Has anyone an idea?

When trying to link the project with statically MFC library, I get linker errors
>> unresolved external symbol __HUGE
because in one one file we use HUGE_VAL and
>> nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
>> nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc

In the linker I specified
as additional dependencies: opengl32.lib glu32.lib winmm.lib setupapi.lib
and as ignore libs:  libc.lib,libcmt.lib

Might be someone could tell me which libraries to link aditionally.

Thank you in advance
Alexander Seebacher from Germany
0
Comment
Question by:PYTHALAB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 200 total points
ID: 17872282
You need to install VC++ 8.0 runtime on destination computer. It can be found in VS directory:
Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\vcredist_x86.exe

If you make installation package using VS 2005 Setup project, add VC++ runtime as prerequisite.
0
 
LVL 1

Author Comment

by:PYTHALAB
ID: 17896327
Thank you so far.

This solves the first half of my problem.
I run the vcredist_x86.exe installation on a test machine and afterwards our program could run there without complaints.

For delivering first small updates of our software our manager wants us to send only the .exe files with statically linked new MFC libraries without the additional MFC 8.0 installation.
So I still have to find out how now to link with static libraries.

Best Regards
Alexander Seebacher
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 17896594
When project is created, MFC can be statically linked by checking this option in ine of Wizard steps. For existing project, use Project Properties - Configuration Properties - General - Use of MFC parameter.
I am not sure that this solves the problem because program still needs VC++ Runtime library.
0
 
LVL 1

Author Comment

by:PYTHALAB
ID: 17899033
That was what I did as the very first step when creating the "Static Release" configuration in Visual Studio 2005.
But when linking, I receive the errors mentioned above.
Originally I linked the same libraries that worked perfectly in the "StaticRelease" configuration of Visual C++ 6.0
0
 
LVL 1

Author Comment

by:PYTHALAB
ID: 17939039
I accepted the answer that helped me to install the missing DLLs on target machines.

The problem of missing __argc and __argv symbols when statically linking the program is still ever present.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question