https://bugs.documentfoundation.org/show_bug.cgi?id=141908

--- Comment #32 from Buovjaga <[email protected]> ---
As the topic of missing library inclusion came up in a recent patch, I will
summarise a discussion that happened on the developer list.

Windows builds were failing for a patch and when I asked about the reason,
Stephan Bergmann told me that oox/CppunitTest_oox_drawingml.mk needed to have a
missing library added to its gb_CppunitTest_use_libraries section. This would
allow MSVC compiler to find definitions of SAL_DLLPUBLIC inline functions.

I could see the color stuff was in include/tools, but I did not know how to
express this in the .mk file. Thinking that the same issue might have appeared
before with this easy hack, I checked the result of

git log --all --grep=141908 -- '*.mk'

Indeed, there was an earlier commit that also had to add the missing library
and I learned it has the nickname tl. So this was a quick and dirty way that
worked in this case, but surely there are better ways for discovery. Others
gave more advice in the developer chat:

- Sometimes the gbuild library name can be immediately seen in a file name, in
this case tools/Library_tl.mk This is not always the case and the real name can
be verified by looking at the $(eval $(call gb_Library_Library,tl)) line in the
.mk file
- Find the .cxx file that implements the thing you want to link to, in this
case tools/source/generic/color.cxx and do a search like:

git grep -l tools/source/generic/color -- '*.mk'

This will reveal the gbuild library name you want.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to