Author Topic: [Resolved] Does Codeblocks Support MFC?  (Read 5131 times)

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
[Resolved] Does Codeblocks Support MFC?
« on: August 12, 2018, 08:19:38 pm »
Hello,

Could somebody intimately familiar with Microsoft Foundation Classes (MFC) and Code::blocks please tell me if Code::blocks does/can support MFC?

Code::blocks has no tempates for creating SDI (Single Document Interface) or MDI (Multiple Document Interface) programs. While with the proper libraries it can compile .cpp and .rc files for MDI example programs, Code::blocks cannot link them all together into an executable file. SDI example programs compile and link successfully.  From my own experimenting and research, i can only assume that that it was never intended for Code::blocks to support MFC. Is that a valid assumption?

Regards.

Frank

« Last Edit: August 29, 2018, 04:23:09 am by Frank_CB »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7592
    • My Best Post
Re: Does Codeblocks Support MFC?
« Reply #1 on: August 12, 2018, 08:26:14 pm »
Code::Blocks an IDE/Editor that works with multiple Compilers.

C::B does not have any MFC wizards to my knowledge.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Does Codeblocks Support MFC?
« Reply #2 on: August 19, 2018, 07:26:47 am »
Yes, it supports MFC as long as you use a compiler and framework that does. I am using MFC do it on a regular basis (although I don't like it, but that's another story...).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
Re: Does Codeblocks Support MFC?
« Reply #3 on: August 19, 2018, 06:02:55 pm »
@Staht01/Tim S
Thanks for your comment

@MortenMacFly
Thanks for your response. It's good to know that MFC can be supported by Codeblocks! Am using VC15 (same compiler that VS2017 uses) in CB 17.12 on a win10 desktop platform.  Are there other frameworks(?) beside SDI and MDI?!  I believe that I could support SDI through using the Win32 GUI template, but not MDI.  My interest in MFC is purely as a hobbyist.

Regards,

Frank

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
Re: Does Codeblocks Support MFC?
« Reply #4 on: August 27, 2018, 07:48:44 pm »
Thanks to everyone who replied!

With regards to my question, I stumbled across a web page last night that explained how winmain is replaced by afxmain(sp) as the entry point to a MFC application.  I added appmodul.cpp to the application.  It compiled along with the other .cpp files and then all .obj files were linked into an executable. I'd been dealing off and on for several months with the application not linking.

Regards!
« Last Edit: August 27, 2018, 07:55:55 pm by Frank_CB »