linker reports 'undefined reference' error
Reported by
mwro...@opera.com,
Feb 13 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 OPR/42.0.2393.94 Steps to reproduce the problem: 1. update third_part/WebKit/Source/core/editing/EditorTest.cpp with attach one 2. run build: ninja third_party/WebKit/Source/web:webkit_unit_tests What is the expected behavior? succesfull build. Linker does not report error What went wrong? build failure. Linker reports 'undefined reference' error Did this work before? N/A Chrome version: 55.0.2883.87 Channel: n/a OS Version: Flash Version: I've added additional test case in: third_party/WebKit/Source/core/editing/EditorTest.cpp which refers HTMButtonElement. As a result linker reporst an error: third_party/WebKit/Source/core/editing/EditorTest.cpp|82| error: undefined reference to 'blink::HTMLButtonElement::create(blink::Document&)' When I look on dependencies in GN files (starting from top component): web:webkit_unit_tests core:unit_tests editing:unit_tests core:core core/html and core/html includes HTMLButtonElement.cpp which means HTMLButtonElement.cpp source file should be compiled and visible to linker. It looks like build tool chain error.
,
Feb 14 2017
HTMLButtonElement needs to be core-exported to be visible in unit tests.
Please add CORE_EXPORT to the class declaration (L31 of HTMLButtonElement.h) as follows:
class CORE_EXPORT HTMLButtonElement final : public HTMLFormControlElement {
,
Feb 14 2017
,
Feb 14 2017
Please add CORE_EXPORT to HTMLButtonElement class declaration as describe in #c2 with your patch which uses HTMLButtonElement in webkit_unittests.
,
Feb 14 2017
#1 sorry, I missed a file. #2, #4 thanks, it does the job. |
|||
►
Sign in to add a comment |
|||
Comment 1 by l...@chromium.org
, Feb 13 2017Labels: Needs-Feedback