Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add MFC support to existing Win32 C++ Project?

Tags:

I am creating a C++ application which uses Qt to create the GUI. However, I need to use a third party library which relies on MFC (for CString's, etc). Is there anyway to add MFC to my application to allow me to use this library or do I need to rewrite it myself?

I saw this question, but it doesn't tell me how to add MFC manually to the project.

like image 252
Kryten Avatar asked Jan 06 '10 17:01

Kryten


1 Answers

If the library app takes/returns/uses CStrings it will need linking with the MFC libs, or will have the MFC libs already statically linked.

If you are using Visual studio you can just check "use MFc in static/shared lib" as appropriate, it doesn;t affect your application GUI as long as you keep your current program entry point.

like image 71
Martin Beckett Avatar answered Sep 19 '22 19:09

Martin Beckett