C++ 在pdfium中创建dll

C++ 在pdfium中创建dll,c++,dll,visual-studio-2013,linker,pdfium,C++,Dll,Visual Studio 2013,Linker,Pdfium,我正在尝试为pdfium创建一个dll。我正在使用Visual Studio 2013(C++) 我尝试了按照来自的说明进行操作,但没有成功。(我正在尝试为不是PdfiumViewer的项目获取pdfium dll)。我得到以下错误: 2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(1193,5): warning MSB8012: TargetPath(\build\D

我正在尝试为
pdfium
创建一个dll。我正在使用Visual Studio 2013(C++) 我尝试了按照来自的说明进行操作,但没有成功。(我正在尝试为不是PdfiumViewer的项目获取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)" (?AddSystemFont@CPDF_InterForm@@SAPEAVCPDF_Font@@PEBVCPDF_Document@@VCFX_ByteString@@E@Z)
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)" (?AddSystemFont@CPDF_InterForm@@SAPEAVCPDF_Font@@PEBVCPDF_Document@@VCFX_WideString@@E@Z)
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 &)" (?RetrieveSpecificFont@@YAHAEAUtagLOGFONTA@@@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 &)" (?RetrieveStockFont@@YAHHEAEAUtagLOGFONTA@@@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)" (?AddSystemFont@CPDF_InterForm@@SAPEAVCPDF_Font@@PEBVCPDF_Document@@VCFX_ByteString@@E@Z)
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)" (?AddSystemFont@CPDF_InterForm@@SAPEAVCPDF_Font@@PEBVCPDF_Document@@VCFX_WideString@@E@Z)
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 &)" (?RetrieveSpecificFont@@YAHAEAUtagLOGFONTA@@@Z)
2>fpdfdoc.lib(doc_form.obj) : error LNK2019: unresolved external symbol __imp_ReleaseDC referenced in function "int __cdecl RetrieveSpecificFont(struct tagLOGFONTA &)" (?RetrieveSpecificFont@@YAHAEAUtagLOGFONTA@@@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)" (?AddWindowsFont@CPDF_Document@@QEAAPEAVCPDF_Font@@PEAUtagLOGFONTA@@HH@Z)
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)" (?AddWindowsFont@CPDF_Document@@QEAAPEAVCPDF_Font@@PEAUtagLOGFONTA@@HH@Z)
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)" (?AddWindowsFont@CPDF_Document@@QEAAPEAVCPDF_Font@@PEAUtagLOGFONTA@@HH@Z)
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)" (?AddWindowsFont@CPDF_Document@@QEAAPEAVCPDF_Font@@PEAUtagLOGFONTA@@HH@Z)
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__ *)" (?_FPDF_GetPSNameFromTT@@YA?AVCFX_ByteString@@PEAUHDC__@@@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)" (?AddWindowsFont@CPDF_Document@@QEAAPEAVCPDF_Font@@PEAUtagLOGFONTA@@HH@Z)
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)" (?AddWindowsFont@CPDF_Document@@QEAAPEAVCPDF_Font@@PEAUtagLOGFONTA@@HH@Z)
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)" (?GetDIBits@CGdiDisplayDriver@@MEAAHPEAVCFX_DIBitmap@@HHPEAXH@Z)
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)" (??0CGdiDeviceDriver@@IEAA@PEAUHDC__@@H@Z)
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)" (?GetDIBits@CGdiDisplayDriver@@MEAAHPEAVCFX_DIBitmap@@HHPEAXH@Z)
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)" (?DrawCosmeticLine@CGdiDeviceDriver@@MEAAHMMMMIHPEAXH@Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_CreateRectRgn referenced in function "protected: virtual void * __cdecl CGdiDeviceDriver::GetClipRgn(void)" (?GetClipRgn@CGdiDeviceDriver@@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)" (?FillRect@CGdiDeviceDriver@@MEAAHPEBUFX_RECT@@IHPEAXH@Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_ExtEscape referenced in function "int __cdecl GetPSLevel(struct HDC__ *)" (?GetPSLevel@@YAHPEAUHDC__@@@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 *)" (?GetClipBox@CGdiDeviceDriver@@MEAAHPEAUFX_RECT@@@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)" (?GetClipRgn@CGdiDeviceDriver@@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)" (??0CGdiDeviceDriver@@IEAA@PEAUHDC__@@H@Z)
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)" (?GetDIBits@CGdiDisplayDriver@@MEAAHPEAVCFX_DIBitmap@@HHPEAXH@Z)
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)" (??0CGdiDeviceDriver@@IEAA@PEAUHDC__@@H@Z)
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)" (?SetClip_PathFill@CGdiDeviceDriver@@MEAAHPEBVCFX_PathData@@PEBVCFX_Matrix@@H@Z)
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)" (?DrawCosmeticLine@CGdiDeviceDriver@@MEAAHMMMMIHPEAXH@Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_RestoreDC referenced in function "protected: virtual void __cdecl CGdiDeviceDriver::RestoreState(int)" (?RestoreState@CGdiDeviceDriver@@MEAAXH@Z)
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)" (?RestoreState@CGdiDeviceDriver@@MEAAXH@Z)
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 *)" (?SetClipRgn@CGdiDeviceDriver@@MEAAHPEAX@Z)
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 *)" (?GDI_SetDIBits@CGdiDeviceDriver@@IEAAHPEBVCFX_DIBitmap@@PEBUFX_RECT@@HHPEAX@Z)
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)" (?DrawPath@CGdiDeviceDriver@@MEAAHPEBVCFX_PathData@@PEBVCFX_Matrix@@PEBVCFX_GraphStateData@@IIHHPEAXH@Z)
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 *)" (?GDI_SetDIBits@CGdiDeviceDriver@@IEAAHPEBVCFX_DIBitmap@@PEBUFX_RECT@@HHPEAX@Z)
2>fxge.lib(fx_win32_device.obj) : error LNK2019: unresolved external symbol __imp_SetStretchBltMode referenced in function "protected: __cdecl CGdiDeviceDriver::CGdiDeviceDriver(struct HDC__ *,int)" (??0CGdiDeviceDriver@@IEAA@PEAUHDC__@@H@Z)
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 &)" (?GetFontCharset@CWin32FontInfo@@UEAAHPEAXAEAH@Z)
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)" (??0CFX_WinBitmapDevice@@QEAA@HHW4FXDIB_Format@@@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 *)" (?_SetPathToDC@@YAXPEAUHDC__@@PEBVCFX_PathData@@PEBVCFX_Matrix@@@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 *)" (?_SetPathToDC@@YAXPEAUHDC__@@PEBVCFX_PathData@@PEBVCFX_Matrix@@@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 *)" (?_SetPathToDC@@YAXPEAUHDC__@@PEBVCFX_PathData@@PEBVCFX_Matrix@@@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)" (?DrawPath@CGdiDeviceDriver@@MEAAHPEBVCFX_PathData@@PEBVCFX_Matrix@@PEBVCFX_GraphStateData@@IIHHPEAXH@Z)
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)" (?SetClip_PathFill@CGdiDeviceDriver@@MEAAHPEBVCFX_PathData@@PEBVCFX_Matrix@@H@Z)
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)" (?DrawPath@CGdiDeviceDriver@@MEAAHPEBVCFX_PathData@@PEBVCFX_Matrix@@PEBVCFX_GraphStateData@@IIHHPEAXH@Z)
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)" (?DrawPath@CGdiDeviceDriver@@MEAAHPEBVCFX_PathData@@PEBVCFX_Matrix@@PEBVCFX_GraphStateData@@IIHHPEAXH@Z)
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)" (?DrawPath@CGdiDeviceDriver@@MEAAHPEBVCFX_PathData@@PEBVCFX_Matrix@@PEBVCFX_GraphStateData@@IIHHPEAXH@Z)
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 *)" (?SetClip_PathStroke@CGdiDeviceDriver@@MEAAHPEBVCFX_PathData@@PEBVCFX_Matrix@@PEBVCFX_GraphStateData@@@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)" (?_CreatePen@@YAPEAUHPEN__@@PEBVCFX_GraphStateData@@PEBVCFX_Matrix@@I@Z)
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)" (?DrawCosmeticLine@CGdiDeviceDriver@@MEAAHMMMMIHPEAXH@Z)
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 *)" (?_SetPathToDC@@YAXPEAUHDC__@@PEBVCFX_PathData@@PEBVCFX_Matrix@@@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 &)" (?GetFaceName@CWin32FontInfo@@UEAAHPEAXAEAVCFX_ByteString@@@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)" (?FillRect@CGdiDeviceDriver@@MEAAHPEBUFX_RECT@@IHPEAXH@Z)
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__ *)" (?GetDDBitmap@CFX_WindowsDIB@@SAPEAUHBITMAP__@@PEBVCFX_DIBitmap@@PEAUHDC__@@@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_)" (?LoadDIBitmap@CFX_WindowsDIB@@SAPEAVCFX_DIBitmap@@UWINDIB_Open_Args_@@@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 &)" (?DrawGlyphRun@CDwGdiTextRenderer@@QEAAJAEBUFX_RECT@@PEAVCFX_ClipRgn@@PEBUDWRITE_MATRIX@@MMW4DWRITE_MEASURING_MODE@@PEBUDWRITE_GLYPH_RUN@@AEBK@Z)
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)" (?Init@CPSPrinterDriver@@QEAAHPEAUHDC__@@HH@Z)
2>\build\Debug\pdfium.dll : fatal error LNK1120: 57 unresolved externals
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

有人知道我应该做什么吗?

我下载并构建了
pdfium
,如中所述。我的步骤:

  • 下载
    pdfium
  • 生成Visual Studio项目和解决方案
  • 打开解决方案
    all.sln
  • 生成
    all.sln
    ,错误
    LNK1112
    。我将项目的目标计算机
    pdfium
    更改为
    /machine:x86
    。现在一切都好了,我得到了静态库
  • 我将
    pdfium
    项目类型更改为
    dll
  • FPDFSDK\u导出添加到预处理器定义中
  • 添加依赖项,如中所述
  • 我将工具集更改为
    v120\u xp
  • 生成,链接器错误。我将库列表更改为(所有库从
    $(OutDir)
    ):
    
    内核32.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\u 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\u 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\u base\u 0.lib
    $(OutDir)\lib\v8\u base\u 1.lib
    $(OutDir)\lib\v8\u base\u 2.lib
    $(OutDir)\lib\v8\u base\u 3.lib
    $(OutDir)\lib\v8\u libbase.lib
    $(OutDir)\lib\v8\u libplatform.lib
    $(OutDir)\lib\v8\u nosnapshot.lib
    $(OutDir)\lib\v8\u snapshot.lib
    
  • Buil,现在一切都好了,我得到了动态库(dll)
  • 我下载文件pdfiumviewer.cpp,并将其添加到项目中
  • 生成,编译错误,未找到头文件
  • 添加
    第三方\freetype\include;v8;v8\包括添加以包括目录
  • 编译错误
  • 在文件
    pdfiumviewer.cpp
    中,将字符串
    替换为包含“../../fpdfsdk/include/fpdfview.h”
    #包含“../../public/fpdfview.h”
  • 构建,现在一切正常,我得到动态库(dll)
  • 还有一件事,如果您想要构建
    pdfium\u test
    project,您需要修复
    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
    

    对于build
    pdfium\u embedderdtests
    您可以只关闭
    将警告视为错误
    选项,但我不知道后果如何

    如果有人仍在寻找答案,另一种方法是下载预编译库


    从chromium源代码为Linux、Windows、Mac生成最新的二进制文件。

    如果在链接器输入选项卡的步骤
    中出错,则必须将其他依赖项设置为。
    是否在链接器设置中添加了
    Gdi32.lib
    ?@gomons,是,我添加了Gdi32。lib@gomons-该步骤中应包含哪些步骤:在链接器输入选项卡中,必须将附加依赖项设置为项目属性
    配置属性->链接器->命令行
    添加
    /VERBOSE:LIB
    附加选项
    。现在链接器将打印所有链接的库。你能提供这份名单吗?谢谢@gomons!您根据哪些说明构建解决方案(步骤2)?另外,您有哪个windows版本?user3872358,我生成的解决方案如下所述。我在我的机器上使用windows 8.1。用户3872358,我可以为您共享我的项目(85MB 7z存档)。我不明白7是什么…您指的是哪些依赖项?@gomons首先感谢您的指导。我试着生成一个DLL,在第9步之前一切都很顺利,但重要的第10步失败了。我得到了一些LNK2019错误,比如“fxcodec.lib(fx_codec_flate.obj):错误LNK2019:未解析的外部符号_FPDFAPI_在函数中引用膨胀…”您是否更改了项目设置中的其他内容以防止这些错误?