Petr Mladek wrote:
Hi all,
I tried to send this mail to [email protected] some hours ago. It seems
that it was not delivered (it is not in the mailing list archive). I do not
know why. So, I try [email protected] now.
Could you help me to find the right place where to discuss this problem at
least? :-)
This list is just fine. (In the recent past, there have sometimes been
horrible delays for these lists, so maybe that is a reason why your
posting did not show up on [EMAIL PROTECTED]; [EMAIL PROTECTED] would also be fine, but lets
stick here. Btw: I at least prefere mailing lists to irc.)
I am fixing OOo to build with the upcoming gcc-4.1. And I got many similar
build errors like this one:
--- cut ---
/usr/src/packages/BUILD/ooo-build-2.1.137/build/src680-m137/cppuhelper/source/access_control.cxx:65:
instantiated from here
/usr/src/packages/BUILD/ooo-build-2.1.137/build/src680-m137/solver/680/unxlngi6.pro/inc/com/sun/star/uno/Any.hxx:240:
error: no matching function for call to
'getCppuType(com::sun::star::uno::Reference<com::sun::star::security::XAccessContr
oller>*)'
../unxlngi6.pro/inc/com/sun/star/uno/Exception.hpp:62: note: candidates are:
const com::sun::star::uno::Type& getCppuType(const
com::sun::star::uno::Exception*)
../unxlngi6.pro/inc/com/sun/star/uno/RuntimeException.hpp:44: note:
const com::sun::star::uno::Type& getCppuType(const
com::sun::star::uno::RuntimeException*)
../unxlngi6.pro/inc/com/sun/star/uno/TypeClass.hdl:57: note:
const com::sun::star::uno::Type& getCppuType(const
com::sun::star::uno::TypeClass*)
/usr/src/packages/BUILD/ooo-build-2.1.137/build/src680-m137/solver/680/unxlngi6.
--- cut ---
The problem is the following. Any.hxx defines some inline operators and
methods that use the function getCppuType. The function getCppuType is
declared for many types in the .hdl include files and is defined in the
related .hpp include files. Most of the .hpp files includes Any.hxx.
Thereafter, Any.hxx is usually included when the first .hpp file is included.
It means that Any.hxx is included before the other .hpp/.hdl files are
included. It means that the methods and operators from Any.hxx are defined
before the related getCppuType functions are even declared.
It worked in the past but gcc-4.1 does not longer allow this situation. I
discussed it with our gcc developers and they said that the code was broken.
The function getCppuType must be declared before it is used at least.
Indeed a problem. Give me some time to think about it... :)
The below are both non-solutions, in that the number of hdl/hpp files is
not statically known. Anybody can create his own UNO types, generate
hdl/hpp files for them (using cppumaker), and should be able to use them
together with (the one and only version of) Any.hxx.
-Stephan
[...]
I thought about other solutions but they seem to be unusable:
For example, I tried to declare all the getCppuType functions in Any.hxx. It
is ugly because this declaration conflits with the declaration in the
related .hdl file. It is a nasty hack in each case. In addition, there is a
problem that many other types and namespaces must be declared as well.
Another attempt was to include all .hdl files in Any.hxx. It is very ugly. It
means to include some hundreds of files. In addition, all the .hdl files are
not available every time, they are defined in more modules, ... Finally,
there are some conflicts in declarations. These conflicts do not appear if
the conflicting declaration is not included now. So, it would require some
more fixes to avoid such conflicts, ...
>
I has not found any other reasonable solution yet.
What do you think?
Is there a better solution?
Add me to CC because I am not on this list, please.
We could discuss it on irc if you prefere this way. I am often on the channel
#openoffice.org, nick pmladek.
Thanks in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]