[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Converting from Visual C++ 6 to VisualStudio 2005

Posted on 2006-11-03
5
Medium Priority
?
935 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 600 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

656 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