Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,

I have an MFC application that compiles using Win32 (32bit) x86 settings, meaning I have not targeted for x64 and I dont release it under x64, however when I build a setup using installshield it shows a dependency for Visual C++ MFC 12.0 (x64).

I have 2 questions I could really really use your help with.

1- How can I change in the Visual Studio project to reference to MFCx86 instead of MFC x64.
2- Can I just remove the reference to MFC x64 in installshield and ship it with MFC x86 instead? would it still work?

I really appreciate your help with this one.

Thanks a lot!
Posted

You can remove the refernce to x64 if you havent compiled for it. Installshield can be nasty.

To be shure that all is fine, test your setup on a clean x32 machine which has no development tools installed.

If you have problems use the dependency walker to identify them.
 
Share this answer
 
Comments
Shirzad Sharif 23-May-15 3:40am    
Thanks for your feedback!! Any idea why it would be referencing x64 at all? I was hoping there would be a way to change the reference to use MFC x86 directly in Visual Studio in order to avoid any mismatches whatsover later on, I am getting some program crashes on use of MFC controls which is why I need to make sure the right version of MFC is being used on the client computers which doesnt seem to be the case now.
Stefan_Lang 11-Jun-15 8:39am    
The only place I see to choose the target platform is in the configuration manager. Make sure all projects in your solution use Win32 as the target platform. If that is not it, it could be reference from a third party library: make sure that you are using the correct version (win32/x86, not x64).
The best option here seems to be to compile using MFC as static option as well as use only Multithreaded /MT switch, this can cause some problems which are described here in detail:

https://social.msdn.microsoft.com/Forums/lync/en-US/9dc36e13-c3bd-4f47-a105-f1c68f3447ce/please-use-the-md-switch-for-afxdll-builds?forum=vcgeneral[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900