71
Help / Re: Build error "'HEAP_INFORMATION_CLASS' has not been declared"
« Last post by beautylesson on March 20, 2026, 04:05:12 am »You likely have a broken Compiler or wxWidgets installation or do NOT have WX_PRECOMP defined (but the log you posted has it defined).Maybe I need to post this question in another forum topic? For example, in Using Code::Blocks? I really need to configure Code::Blocks to create GTK applications, and in this topic the answer is no.
Where and How did you do the wxWidgets installation?
It appears to be missing the #include "wx/msw/wrapwin.h" from "wx/wxprec.h" header.
(The wrapwin.h includes windows.h; that includes winnt.h that defines HEAP_INFORMATION_CLASS fnf)
In the app.cpp file try adding the code below between the including <sdk.h> and "app.h".
If it works; likely have wxWidgets issue; if it still fails likely has a bad Compiler.
To confirm compiler try including
#include <windows.h>
or
#include <winnt.h>
Edit 4 or 5: changed __WINDOWS__ to __WXMSW__ in code below.Code#include <sdk.h>
#ifndef WX_PRECOMP
#ifdef __WXMSW__
#include <wx/msw/wrapwin.h> // HEAP_INFORMATION_CLASS
#endif // __WXMSW__
#endif // WX_PRECOMP
#include "app.h"
Tim S.
Recent Posts