which library needs to be linked to, that has implementation code for ErrorInfo::IsA
nicholas ferguson
nicholasferguson at wingarch.com
Sun Sep 28 18:22:32 PDT 2014
Not a library...probably a preprocessor directive?
From: LibreOffice [mailto:libreoffice-bounces at lists.freedesktop.org] On
Behalf Of nicholas ferguson
Sent: Sunday, September 28, 2014 7:19 PM
To: 'libreoffice'
Subject: which library needs to be linked to, that has implementation code
for ErrorInfo::IsA
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/5afc1051/attachment.html>
More information about the LibreOffice
mailing list