which library needs to be linked to, that has implementation code for ErrorInfo::IsA

nicholas ferguson nicholasferguson at wingarch.com
Sun Sep 28 16:18:42 PDT 2014


 

My env.  Cygwin + Visual Studio.  Windows 7

 

(1)    IsA in ErrorInfo comes from a macro in rtti.hxx

a.       /include/tools/errinfo.hxx

                                                               i.      class
ErrorInfo has as member, macro TYPEINFO() to include 5 methods, including
IsA

b.      /include/tools/rtti.hxx

                                                               i.      This
has macros, including TYPEINFO

c.       Tools/ref/errinf.cxx   ( implementation file, but does not include
implementations for five methods via TYPEINFO macro.

 

(2)    What library needs to be linked to that has  implementation code for
macros in rtti.hxx  for a Win32 Intel platform?

 

 

Here is a test code

//===========================================

#include "stdafx.h"

#include <rtl/ustring.hxx>

#include <include/tools/rtti.hxx>

 

typedef void* (*TypeId)();

class ErrorInfoX

{

private:

    sal_uIntPtr             lUserId;

public:

                            TYPEINFO();

                            ErrorInfoX( sal_uIntPtr lArgUserId ) :

                                lUserId( lArgUserId ){}

    virtual                 ~ErrorInfoX(){}

    sal_uIntPtr             GetErrorCode() const { return lUserId; }

    static ErrorInfoX*       GetErrorInfo(sal_uIntPtr);

};

int main(int argc, char* argv[])

{

                sal_uIntPtr t = 4;

                ErrorInfoX err(t);

                return 0;

}

//linked to lib(s)  itl.lib  ( tools )

 

/*

error output:

1>testdefine.obj : error LNK2001: unresolved external symbol "public:
virtual void * (__cdecl*__thiscall ErrorInfoX::Type(void)const )(void)"
(?Type at ErrorInfoX@@UBEP6APAXXZXZ)

1>testdefine.obj : error LNK2001: unresolved external symbol "public:
virtual bool __thiscall ErrorInfoX::IsA(void * (__cdecl*)(void))const "
(?IsA at ErrorInfoX@@UBE_NP6APAXXZ at Z)

1>C:\cygwin64\home\lo\Excel.Analysis\Test.OpenClose\Debug\testdefine.exe :
fatal error LNK1120: 2 unresolved externals

*/

//========================================================================

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20140928/a545bd63/attachment.html>


More information about the LibreOffice mailing list