2015-05-14 98 views
1

我正在嘗試爲pdfium創建一個dll。我正在使用Visual Studio 2013(C++) 我試過了從https://github.com/pvginkel/PdfiumViewer以下的指令,但沒有奏效(我想爲一個不是PdfiumViewer的項目獲得pdfium dll)。我收到以下錯誤:在pdfium中創建一個dll

2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(1193,5): warning MSB8012: TargetPath(\build\Debug\lib\pdfium.dll) does not match the Linker's OutputFile property value (C:\build\Debug\pdfium.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). 
2>  Creating library \build\Debug\pdfium.lib and object \build\Debug\pdfium.exp 
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_CreateFontA referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_ByteString,unsigned char)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_CreateFontA 
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_CreateFontW referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_WideString,unsigned char)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject 
2>fpdfdoc.lib(doc_form.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject 
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject 
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject 
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_DeleteObject 
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_EnumFontFamiliesExA referenced in function "int __cdecl RetrieveSpecificFont(struct tagLOGFONTA &)" ([email protected]@[email protected]@@Z) 
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_EnumFontFamiliesExA 
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetStockObject referenced in function "int __cdecl RetrieveStockFont(int,unsigned char,struct tagLOGFONTA &)" ([email protected]@[email protected]@@Z) 
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetObjectA referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_ByteString,unsigned char)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]) 
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetObjectW referenced in function "public: static class CPDF_Font * __cdecl CPDF_InterForm::AddSystemFont(class CPDF_Document const *,class CFX_WideString,unsigned char)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_GetObjectW 
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_GetObjectW 
2>fxge.lib(fx_win32_dwrite.obj) : error LNK2001: unresolved external symbol __imp_GetObjectW 
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_GetDC referenced in function "int __cdecl RetrieveSpecificFont(struct tagLOGFONTA &)" ([email protected]@[email protected]@@Z) 
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_ReleaseDC referenced in function "int __cdecl RetrieveSpecificFont(struct tagLOGFONTA &)" ([email protected]@[email protected]@@Z) 
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_CreateCompatibleDC referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_CreateCompatibleDC 
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_CreateCompatibleDC 
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_CreateFontIndirectA referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_CreateFontIndirectA 
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_DeleteDC referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_DeleteDC 
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_DeleteDC 
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_GetCharWidthW referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]) 
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_GetFontData referenced in function "class CFX_ByteString __cdecl _FPDF_GetPSNameFromTT(struct HDC__ *)" ([email protected]@[email protected]@[email protected]@@Z) 
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_GetFontData 
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_GetOutlineTextMetricsW referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]) 
2>fpdfapi.lib(fpdf_edit_doc.obj) : error LNK2019: unresolved external symbol __imp_SelectObject referenced in function "public: class CPDF_Font * __cdecl CPDF_Document::AddWindowsFont(struct tagLOGFONTA *,int,int)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2001: unresolved external symbol __imp_SelectObject 
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_SelectObject 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_BitBlt referenced in function "protected: virtual int __cdecl CGdiDisplayDriver::GetDIBits(class CFX_DIBitmap *,int,int,void *,int)" ([email protected]@@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_BitBlt 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateBitmap referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" ([email protected]@[email protected][email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateCompatibleBitmap referenced in function "protected: virtual int __cdecl CGdiDisplayDriver::GetDIBits(class CFX_DIBitmap *,int,int,void *,int)" ([email protected]@@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreatePen referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawCosmeticLine(float,float,float,float,unsigned int,int,void *,int)" ([email protected]@@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateRectRgn referenced in function "protected: virtual void * __cdecl CGdiDeviceDriver::GetClipRgn(void)" ([email protected]@@MEAAPEAXXZ) 
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_CreateRectRgn 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateSolidBrush referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::FillRect(struct FX_RECT const *,unsigned int,int,void *,int)" ([email protected]@@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_ExtEscape referenced in function "int __cdecl GetPSLevel(struct HDC__ *)" ([email protected]@[email protected]@@Z) 
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_ExtEscape 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetClipBox referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::GetClipBox(struct FX_RECT *)" ([email protected]@@[email protected]@@Z) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetClipRgn referenced in function "protected: virtual void * __cdecl CGdiDeviceDriver::GetClipRgn(void)" ([email protected]@@MEAAPEAXXZ) 
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_GetClipRgn 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceCaps referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" ([email protected]@[email protected][email protected]@[email protected]) 
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_GetDeviceCaps 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetDIBits referenced in function "protected: virtual int __cdecl CGdiDisplayDriver::GetDIBits(class CFX_DIBitmap *,int,int,void *,int)" ([email protected]@@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_GetDIBits 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetObjectType referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" ([email protected]@[email protected][email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_IntersectClipRect referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClip_PathFill(class CFX_PathData const *,class CFX_Matrix const *,int)" ([email protected]@@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_LineTo referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawCosmeticLine(float,float,float,float,unsigned int,int,void *,int)" ([email protected]@@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_RestoreDC referenced in function "protected: virtual void __cdecl CGdiDeviceDriver::RestoreState(int)" ([email protected]@@[email protected]) 
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_RestoreDC 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SaveDC referenced in function "protected: virtual void __cdecl CGdiDeviceDriver::RestoreState(int)" ([email protected]@@[email protected]) 
2>fxge.lib(fx_win32_print.obj) : error LNK2001: unresolved external symbol __imp_SaveDC 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SelectClipRgn referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClipRgn(void *)" ([email protected]@@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetDIBitsToDevice referenced in function "protected: int __cdecl CGdiDeviceDriver::GDI_SetDIBits(class CFX_DIBitmap const *,struct FX_RECT const *,int,int,void *)" ([email protected]@@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetPolyFillMode referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" ([email protected]@@[email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_StretchDIBits referenced in function "protected: int __cdecl CGdiDeviceDriver::GDI_SetDIBits(class CFX_DIBitmap const *,struct FX_RECT const *,int,int,void *)" ([email protected]@@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetStretchBltMode referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" ([email protected]@[email protected][email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetTextMetricsW referenced in function "public: virtual int __cdecl CWin32FontInfo::GetFontCharset(void *,int &)" ([email protected]@@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateDIBSection referenced in function "public: __cdecl CFX_WinBitmapDevice::CFX_WinBitmapDevice(int,int,enum FXDIB_Format)" ([email protected]@[email protected][email protected]@@Z) 
2>fxge.lib(fx_win32_dib.obj) : error LNK2001: unresolved external symbol __imp_CreateDIBSection 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_BeginPath referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" ([email protected]@[email protected]@[email protected]@[email protected]@@Z) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CloseFigure referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" ([email protected]@[email protected]@[email protected]@[email protected]@@Z) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_EndPath referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" ([email protected]@[email protected]@[email protected]@[email protected]@@Z) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_FillPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" ([email protected]@@[email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SelectClipPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClip_PathFill(class CFX_PathData const *,class CFX_Matrix const *,int)" ([email protected]@@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetMiterLimit referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" ([email protected]@@[email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_StrokeAndFillPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" ([email protected]@@[email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_StrokePath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawPath(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *,unsigned int,unsigned int,int,int,void *,int)" ([email protected]@@[email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_WidenPath referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::SetClip_PathStroke(class CFX_PathData const *,class CFX_Matrix const *,class CFX_GraphStateData const *)" ([email protected]@@[email protected]@[email protected]@[email protected]@@Z) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_ExtCreatePen referenced in function "struct HPEN__ * __cdecl _CreatePen(class CFX_GraphStateData const *,class CFX_Matrix const *,unsigned int)" ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_MoveToEx referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::DrawCosmeticLine(float,float,float,float,unsigned int,int,void *,int)" ([email protected]@@[email protected]) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_PolyBezierTo referenced in function "void __cdecl _SetPathToDC(struct HDC__ *,class CFX_PathData const *,class CFX_Matrix const *)" ([email protected]@[email protected]@[email protected]@[email protected]@@Z) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_GetTextFaceA referenced in function "public: virtual int __cdecl CWin32FontInfo::GetFaceName(void *,class CFX_ByteString &)" ([email protected]@@[email protected]@@Z) 
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_FillRect referenced in function "protected: virtual int __cdecl CGdiDeviceDriver::FillRect(struct FX_RECT const *,unsigned int,int,void *,int)" ([email protected]@@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_dib.obj) : error LNK2019: unresolved external symbol __imp_CreateDIBitmap referenced in function "public: static struct HBITMAP__ * __cdecl CFX_WindowsDIB::GetDDBitmap(class CFX_DIBitmap const *,struct HDC__ *)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@@Z) 
2>fxge.lib(fx_win32_dib.obj) : error LNK2019: unresolved external symbol __imp_LoadImageW referenced in function "public: static class CFX_DIBitmap * __cdecl CFX_WindowsDIB::LoadDIBitmap(struct WINDIB_Open_Args_)" ([email protected][email protected]@[email protected]@[email protected]@@Z) 
2>fxge.lib(fx_win32_dwrite.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentObject referenced in function "public: long __cdecl CDwGdiTextRenderer::DrawGlyphRun(struct FX_RECT const &,class CFX_ClipRgn *,struct DWRITE_MATRIX const *,float,float,enum DWRITE_MEASURING_MODE,struct DWRITE_GLYPH_RUN const *,unsigned long const &)" ([email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]) 
2>fxge.lib(fx_win32_print.obj) : error LNK2019: unresolved external symbol __imp_GetRegionData referenced in function "public: int __cdecl CPSPrinterDriver::Init(struct HDC__ *,int,int)" ([email protected]@@[email protected]@[email protected]) 
2>\build\Debug\pdfium.dll : fatal error LNK1120: 57 unresolved externals 
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 

有沒有人有什麼我應該做的想法?

+0

您在步驟中犯了一個錯誤'在鏈接器|輸入選項卡,其他依賴關係必須設置爲。' – gomons

+0

您是否在鏈接器設置中添加了'Gdi32.lib'? – gomons

+0

@gomons,是的,我添加了Gdi32.lib – user3872358

回答

2

我下載並構建了pdfium,如https://github.com/pvginkel/PdfiumViewer中所述。我的步驟:

  1. 下載pdfium
  2. 生成Visual Studio項目和解決方案
  3. 開放的解決方案all.sln
  4. 構建all.sln,錯誤LNK1112。我將項目pdfium的目標機器更改爲/MACHINE:x86。現在一切正常,我得到的靜態庫
  5. 我改變pdfium項目類型dll
  6. 添加FPDFSDK_EXPORTS到預處理器定義
  7. 添加依賴關係在https://github.com/pvginkel/PdfiumViewer
  8. 描述更改的工具集來v120_xp
  9. 編譯器,連接器錯誤。我更改庫列表(從$(OutDir)所有庫): kernel32.lib user32.lib advapi32.lib gdi32.lib winmm.lib $(OutDir)\lib\bigint.lib $(OutDir)\lib\fdrm.lib $(OutDir)\lib\formfiller.lib $(OutDir)\lib\fpdfapi.lib $(OutDir)\lib\fpdfdoc.lib $(OutDir)\lib\fpdftext.lib $(OutDir)\lib\freetype.lib $(OutDir)\lib\fx_lpng.lib $(OutDir)\lib\fxcodec.lib $(OutDir)\lib\fxcrt.lib $(OutDir)\lib\fxedit.lib $(OutDir)\lib\fxge.lib $(OutDir)\lib\gmock.lib $(OutDir)\lib\gtest.lib $(OutDir)\lib\gtest_main.lib $(OutDir)\lib\icui18n.lib $(OutDir)\lib\icuuc.lib $(OutDir)\lib\javascript.lib $(OutDir)\lib\jsapi.lib $(OutDir)\lib\pdfwindow.lib $(OutDir)\lib\v8_base_0.lib $(OutDir)\lib\v8_base_1.lib $(OutDir)\lib\v8_base_2.lib $(OutDir)\lib\v8_base_3.lib $(OutDir)\lib\v8_libbase.lib $(OutDir)\lib\v8_libplatform.lib $(OutDir)\lib\v8_nosnapshot.lib $(OutDir)\lib\v8_snapshot.lib
  10. BUIL,現在一切正常,我得到動態LIB(DLL)
  11. 我下載文件pdfiumviewer.cpp,並將其添加到項目
  12. 編譯,編譯錯誤,找不到頭文件
  13. third_party\freetype\include;v8;v8\include;添加到包含的目錄中
  14. 生成,編譯錯誤。
  15. 在文件pdfiumviewer.cpp替換字符串#include "../../fpdfsdk/include/fpdfview.h"#include "../../public/fpdfview.h"
  16. 構建,現在一切正常,我得到動態LIB(DLL)

還有一件事,如果你想建立pdfium_test項目,你需要修復fpdfview.h文件:

#define DLLEXPORT __declspec(dllexport) 
#define STDCALL __stdcall 
#else 
#define DLLEXPORT 

#if !defined(_WIN64) 
// On Windows Win32 (not x64) requires __stdcall convention 
#define STDCALL __stdcall 
#else 
#define STDCALL 
#endif // !defined(_WIN64) 

#endif 

對於構建pdfium_embeddertests你可以關閉Treat warnings as errors的選擇,但我不知道後果。

+0

謝謝@gomons!根據哪些說明你建立解決方案(步驟2)?你也有哪些Windows版本? – user3872358

+0

user3872358,我按[此處](https://code.google.com/p/pdfium/wiki/Build)所述生成解決方案。我在我的機器上使用Windows 8.1。 – gomons

+0

user3872358,我可以分享我的項目(85MB 7z存檔)。 – gomons