Apache OpenOffice (AOO) Bugzilla – Issue 123961
libsvx.so won't link because of inconsistence in declaration of ColorControl::SetCurColorSelect
Last modified: 2017-05-20 10:45:23 UTC
Created attachment 82209 [details] possible fix When building using Solaris Studio compiler 12.3. I get following error: [ build LNK ] Library/libsvx.so Undefined first referenced symbol in file void svx::sidebar::ColorControl::SetCurColorSelect(const Color,const bool) /builds/psumbera/aoo/components/openoffice/build/i86/main/solver/401/unxsoli4.pro/workdir/CxxObject/svx/source/sidebar/tools/ColorPopup.o ld: fatal: symbol referencing errors --- This is because of following inconsistence. Header file declares: void ColorControl::SetCurColorSelect (const Color aCol, const bool bAvailable) while ColorControl.cxx has: void ColorControl::SetCurColorSelect (Color aCol, bool bAvailable)
Thanks for the patch! Actually I'd prefer if the declaration was adjusted not to use const for non-reference/non-pointer types, because that is an implementation detail of the function which is irrelevant its users. Some compilers even warn about this. Does your compiler work when you remove the const from the non-reference/non-pointer types in the *hxx file? If the constness aspect is important it should go where it actually belongs: into the function definition (in the *cxx file). Does your compiler allow, that the declaration uses the non-const variant in the declaration and the const variant in the definition?
Reset the assignee to the default "issues@openoffice.apache.org".