what's with Rectangle::GetHeight() and GetWidth() in gen.hxx

Stephan Bergmann sbergman at redhat.com
Thu Dec 13 02:01:06 PST 2012


On 12/13/2012 10:48 AM, Noel Grandin wrote:
> I seem to have triggered a problem on the windows tinderbox, but I'm
> struggling to understand why.
> The error on the tinderbox looks like:
>
>     [build LNK] Library/ires.lib
>     Creating library
> C:/cygwin/home/tinderbox/master-build/workdir/wntmsci13.pro/LinkTarget/Library/iembobj.lib
>
>     and object
> C:/cygwin/home/tinderbox/master-build/workdir/wntmsci13.pro/LinkTarget/Library/iembobj.exp
>
>     docholder.o : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: long __thiscall
> Rectangle::GetHeight(void)const " (__imp_?GetHeight at Rectangle@@QBEJXZ)
>     referenced in function
> __catch$?GetDocFrame at DocumentHolder@@AAE?AV?$Reference at VXFrame@frame at star@sun at com@@@uno at star@sun at com@@XZ$0
>
>
> And the definition in gen.hxx looks like:
>
>    class TOOLS_DLLPUBLIC SAL_WARN_UNUSED Rectangle
>    {
>    public:
>       long                GetWidth() const;
>       long                GetHeight() const;
>   }
>   inline long Rectangle::GetWidth() const
>   {
>     .....
>   }
>
> Firstly, there seems to be a missing inline statement in the class
> header section.

The "inline" in the declaration of Rectangle::GetHeight should not 
strictly be necessary (though it would be good style anyway), but maybe 
the "TOOLS_DLLPUBLIC" on the enclosing class definition does make it 
relevant for MSC.

Stephan


More information about the LibreOffice mailing list