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;
Refer toÂ PDFiumÂ Wiki BuildingÂ PDFium, Â I got all.sln, then open and compile it withÂ Microsoft Visual C++ 2010 Express, got this error,
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.
2 thoughts on “Building PDFium with Microsoft Visual C++ 2010 Express”
Is it still valid, I see v8 now embrace c++11, which needs final keyword