Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: drepster on February 15, 2006, 08:40:26 am
-
Hi,
I am using codeblocks together with the Visual C++ toolkit compiler and I have installed the Microsoft Platform SDK.
I am trying to compile a program which uses an MFC class (CString). I have included the afx.h header which is provided by the Platform SDK in the include\mfc directory. When I build my app I get an error saying:
LINK : fatal error LNK1104: cannot open file 'nafxcw.lib'
I have done some research and from what I can understand the mfc libs are not distributed with the platform sdk and you cannot link to them statically. Instead, for people using Visual C++ they recommend checking a checkbox which says: 'Use MFC in a Shared DLL'.
I am a bit of a newbie so my questions my be a bit obvious but here they are:
- can I compile a app using precompiles DLL's. i.e. I don't need the .Lib file necessarily?
- If so how do I configure codeblock to link against a dll rather than looking for the .lib file
- Last where is the mfc shared dll?
thanks in advance
cheers
andre
-
MFC is not supported by the free toolkit. Period.
Even if you could make it work by copying libraries and DLLs from an existing VisualStudio installation, it would be illegal...
-
Let me say you could use wxWidgets. :D
http://www.wxwidgets.org/
-
Hello,
This link could be useful:
http://www.wxwidgets.org/wiki/index.php/WxWidgets_For_MFC_Programmers
Best wishes,
Michael
-
Thanks for the replies. Saves me time fighting trying to get the thing to compile.
I am going to take you suggestion and try my luck with wxWidgets. Sounds like wxString will do the job.
thanks again
andre