You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Damjan Jovanovic <da...@apache.org> on 2016/04/02 18:44:08 UTC

Exporting symbols from AOO shared libraries

Hi

I am trying to add a unit test to Calc, and the C++ class I want to
test (ScStringUtil) isn't exported from its library (with
SC_DLLPUBLIC), so my test is failing to link.

Can I export that class? What determines when we can/should?

Thank you
Damjan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: Exporting symbols from AOO shared libraries

Posted by Damjan Jovanovic <da...@apache.org>.
The patch is on https://bz.apache.org/ooo/show_bug.cgi?id=126901.

The sc module that my patch affects, doesn't export any headers, so
exporting the symbol still doesn't allow anyone to compile against it,
only to link once they have compiled.

In the sw module which also doesn't export any headers, we have a
GoogleTest_sw_bigpointerarray.mk unit test against BigPtrArray, and
BigPtrArray is exported in main/sw/inc/bparr.hxx even though it never
gets used outside sw, so I think this should be ok.

On Sat, Apr 2, 2016 at 11:49 PM, Patricia Shanahan <pa...@acm.org> wrote:
> A difficult one.
>
> I don't like making things public just to support testing, because later on,
> when someone wants to make changes, it is impossible to tell whether they
> can or not.
>
> In a simpler project, I might suggest doing separate builds for testing, but
> I hesitate to add to the AOO build complexity.
>
> How about a unit test stub class, clearly named as such, wrapping the class
> you want to test and itself exported?
>
>
> On 4/2/2016 9:44 AM, Damjan Jovanovic wrote:
>>
>> Hi
>>
>> I am trying to add a unit test to Calc, and the C++ class I want to
>> test (ScStringUtil) isn't exported from its library (with
>> SC_DLLPUBLIC), so my test is failing to link.
>>
>> Can I export that class? What determines when we can/should?
>>
>> Thank you
>> Damjan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: Exporting symbols from AOO shared libraries

Posted by Patricia Shanahan <pa...@acm.org>.
A difficult one.

I don't like making things public just to support testing, because later 
on, when someone wants to make changes, it is impossible to tell whether 
they can or not.

In a simpler project, I might suggest doing separate builds for testing, 
but I hesitate to add to the AOO build complexity.

How about a unit test stub class, clearly named as such, wrapping the 
class you want to test and itself exported?

On 4/2/2016 9:44 AM, Damjan Jovanovic wrote:
> Hi
>
> I am trying to add a unit test to Calc, and the C++ class I want to
> test (ScStringUtil) isn't exported from its library (with
> SC_DLLPUBLIC), so my test is failing to link.
>
> Can I export that class? What determines when we can/should?
>
> Thank you
> Damjan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org