• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 939
  • Last Modified:

Converting from Visual C++ 6 to VisualStudio 2005

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
PYTHALAB
Asked:
PYTHALAB
  • 3
  • 2
1 Solution
 
AlexFMCommented:
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
 
PYTHALABAuthor Commented:
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
 
AlexFMCommented:
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
 
PYTHALABAuthor Commented:
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
 
PYTHALABAuthor Commented:
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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now