Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


 

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@ErrorInfoX@@UBEP6APAXXZXZ)

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

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

*/

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

 


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.