We had a link error when mapping gfx::Size to IntSize in Blink on Windows. The link error is as follows:
E:/b/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x86 False link.exe /nologo /IMPLIB:./blink_core.dll.lib /DLL /OUT:./blink_core.dll /PDB:./blink_core.dll.pdb @./blink_core.dll.rsp
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: __thiscall blink::IntSize::IntSize(void)" (??0IntSize@blink@@QAE@XZ) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: __thiscall blink::IntSize::IntSize(int,int)" (??0IntSize@blink@@QAE@HH@Z) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: int __thiscall blink::IntSize::width(void)const " (?width@IntSize@blink@@QBEHXZ) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: int __thiscall blink::IntSize::height(void)const " (?height@IntSize@blink@@QBEHXZ) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: unsigned __int64 __thiscall blink::IntSize::area(void)const " (?area@IntSize@blink@@QBE_KXZ) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: bool __thiscall blink::IntSize::isEmpty(void)const " (?isEmpty@IntSize@blink@@QBE_NXZ) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: static void * __cdecl blink::IntSize::operator new(unsigned int,enum NotNullTag,void *)" (??2IntSize@blink@@SAPAXIW4NotNullTag@@PAX@Z) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: bool __thiscall blink::IntSize::isZero(void)const " (?isZero@IntSize@blink@@QBE_NXZ) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: void __thiscall blink::IntSize::clampNegativeToZero(void)" (?clampNegativeToZero@IntSize@blink@@QAEXXZ) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: void __thiscall blink::IntSize::setWidth(int)" (?setWidth@IntSize@blink@@QAEXH@Z) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: void __thiscall blink::IntSize::setHeight(int)" (?setHeight@IntSize@blink@@QAEXH@Z) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: class blink::IntSize __thiscall blink::IntSize::expandedTo(class blink::IntSize const &)const " (?expandedTo@IntSize@blink@@QBE?AV12@ABV12@@Z) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: void __thiscall blink::IntSize::scale(float)" (?scale@IntSize@blink@@QAEXM@Z) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: void __thiscall blink::IntSize::expand(int,int)" (?expand@IntSize@blink@@QAEXHH@Z) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: class blink::IntSize __thiscall blink::IntSize::transposedSize(void)const " (?transposedSize@IntSize@blink@@QBE?AV12@XZ) already defined in offscreen_canvas_surface.mojom-blink.obj
blink_platform.dll.lib(blink_platform.dll) : error LNK2005: "public: int __thiscall blink::IntSize::diagonalLengthSquared(void)const " (?diagonalLengthSquared@IntSize@blink@@QBEHXZ) already defined in offscreen_canvas_surface.mojom-blink.obj
./blink_core.dll : fatal error LNK1169: one or more multiply defined symbols found
ninja: build stopped: subcommand failed.
I suppose it's related to PLATFORM_EXPORT macro. Currently, we are mapping to WebSize which has no exported symbols.
Comment 1 by zqzh...@chromium.org
, Oct 5 2016Components: Internals>Mojo