Can I use vs2005 to write a VC6 MFC program?

  • Thread starter Thread starter Tau
  • Start date Start date
T

Tau

Because vc8 uses MFC80.dll, and many PCs don't have these libraries...
So I wonder if I can use vs2005's IDE to write a vc6 program? I mean
just using mfc42.dll, etc...to make it runnable on other machines.

Thanks in advance.
 
Tau said:
Because vc8 uses MFC80.dll, and many PCs don't have these libraries...
So I wonder if I can use vs2005's IDE to write a vc6 program? I mean
just using mfc42.dll, etc...to make it runnable on other machines.

If you work hard enough at it, maybe. Practially speaking no. You can, of
course, simply distribute the MFC8 DLLs along with your program.

-cd
 
Tau said:
Because vc8 uses MFC80.dll, and many PCs don't have these libraries...
So I wonder if I can use vs2005's IDE to write a vc6 program? I mean
just using mfc42.dll, etc...to make it runnable on other machines.

Thanks in advance.

It is possible to certain extent. Microsoft keeps LIB format pretty much
compatible across generations of VC++ and I have successfully used
MSVCRT.DLL and MFC42.DLL with VS2003 and VS2005 on smaller utilities,
then CArray broke my code :)

Anyway, the method is:

1. Get VC6 libraries (e.g. from Windows 2003 DDK available for nominal
S&H fee from MS)

2. Disable "Buffer security check" in project property page -> C++ ->
Code Generation

3. Add path to your VC6 include files in C++ ->General -> Additional
Include Directories (e.g. C:\WINDDK\3790\inc\mfc42)

4. Add path to your VC6 libraries in Linker -> General -> Additional
Library Directories (e.g. C:\WINDDK\3790\lib\w2k\i386)

Good luck
Roman Ziak
 
Tau said:
Because vc8 uses MFC80.dll, and many PCs don't have these libraries...
So I wonder if I can use vs2005's IDE to write a vc6 program? I mean
just using mfc42.dll, etc...to make it runnable on other machines.


FYI, MFC42.dll is *NOT* guaranteed to be available on all machines either
(it has never been an official part of the OS), so you need to distribute it
anyway. Considering things this way, it is as simpleto switch to the current
version.

Arnaud
MVP - VC
 
Ok. Your method does work! :-)

but i met another problem that i got a link error:

error LNK2019: unresolved external symbol __ftol2_sse referenced in
function...

i went through the function code, and found that this problem is caused
by float-int conversion!
how can i get rid of this error? Thanks!
 
Arnaud said:
FYI, MFC42.dll is *NOT* guaranteed to be available on all machines either
(it has never been an official part of the OS), so you need to distribute it
anyway. Considering things this way, it is as simpleto switch to the current
version.

Arnaud
MVP - VC

This may be true for early version Win95, but I actually looked through
several different machines and it is always there including Win95 w/
Service Pack.
 
Roman said:
This may be true for early version Win95, but I actually looked
through several different machines and it is always there including
Win95 w/ Service Pack.

Perhaps, but it has never been guranteed by MS, so you're on your own when a
client will call because it can't run your soft because of a missing DLL.

Arnaud
MVP - VC
 
Tau said:
Ok. Your method does work! :-)

but i met another problem that i got a link error:

error LNK2019: unresolved external symbol __ftol2_sse referenced in
function...

i went through the function code, and found that this problem is caused
by float-int conversion!
how can i get rid of this error? Thanks!

Sorry, cannot help you, never had that problem. You could probably find
what is the appropriate in MSVCRT.DLL and write __declspec(naked)
wrapper with a jump.
 
Back
Top