For the issue, fatal error RC1015: cannot open include file ‘afxres.h’
not just change “afxres.h” to <windows.h>, but use a better one,
For the issue,core\src\fxge\fx_freetype\fxft2.5.01\src\type1\t1gload.c(287): error C2275: ‘FT_Data’ : illegal use of this type as an expression,
the reason is,
Your code cannot be compiled as C++ code. You’ll have to follow ‘C’ rules, a local variable declaration must appear before any statements in a function body.
so the solution we need put the declarations,
FT_Bool must_finish_decoder = FALSE;
FT_Bool glyph_data_loaded = 0;
before the statements,
font_offset.x = 0;
font_offset.y = 0;
1>fpdfsdk\src\fpdfsdkdll.rc(10): fatal error RC1015: cannot open include file ‘afxres.h’.
After some research, got the answer,
This header is a part of the MFC Library. VS Express edition doesn’t contain MFC. If your project doesn’t use MFC you can safely replace afxres.h with windows.h in your fpdfsdkdll.rc.
after the change, successfully compile it.