Which version of gtest are you using? Can you find GTEST_HAS_RTTI in
include/gtest/internal/gtest-port.h?
>
> What is missing in my project configuration ?
>
--
Zhanyong
How did you set GTEST_HAS_RTTI to 0? Was the setting applied to the
tests you were compiling? What is the exact error message?
>
> On 3 juin, 22:14, Zhanyong Wan (λx.x x) <w...@google.com> wrote:
>> On Wed, Jun 3, 2009 at 12:48 PM, guile <fourni...@gmail.com> wrote:
>>
>> > My c++ project compiles with the flag -fno-rtti set (the development
>> > is made under MacOS X with XCode).
>>
>> > When I compile the tests, I got the following error: "error: cannot
>> > use typeid with -fno-rtti"
>>
>> > I also defined the variable GTEST_HAS_RTTI to 0 to disable the RTTI.
>>
>> Which version of gtest are you using? Can you find GTEST_HAS_RTTI in
>> include/gtest/internal/gtest-port.h?
>>
>>
>>
>> > What is missing in my project configuration ?
>>
>> --
>> Zhanyong
>
--
Zhanyong
Is the error in gtest's code or your code? Could you please provide
the source code that triggers this error and let's know which line
caused the error?
>
>
>
> On 3 juin, 22:37, Zhanyong Wan (λx.x x) <w...@google.com> wrote:
>> On Wed, Jun 3, 2009 at 1:34 PM, guile <fourni...@gmail.com> wrote:
>>
>> > I use the "trunk" version (recompiled).
>> > I can find the GTEST_HAS_RTTI in the header file you specified.
>>
>> How did you set GTEST_HAS_RTTI to 0? Was the setting applied to the
>> tests you were compiling? What is the exact error message?
>>
>>
>>
>>
>>
>> > On 3 juin, 22:14, Zhanyong Wan (λx.x x) <w...@google.com> wrote:
>> >> On Wed, Jun 3, 2009 at 12:48 PM, guile <fourni...@gmail.com> wrote:
>>
>> >> > My c++ project compiles with the flag -fno-rtti set (the development
>> >> > is made under MacOS X with XCode).
>>
>> >> > When I compile the tests, I got the following error: "error: cannot
>> >> > use typeid with -fno-rtti"
>>
>> >> > I also defined the variable GTEST_HAS_RTTI to 0 to disable the RTTI.
>>
>> >> Which version of gtest are you using? Can you find GTEST_HAS_RTTI in
>> >> include/gtest/internal/gtest-port.h?
>>
>> >> > What is missing in my project configuration ?
>>
>> >> --
>> >> Zhanyong
>>
>> --
>> Zhanyong
>
--
Zhanyong
gtest doesn't use tr1/functional. However, its Combine() function
(for value-parameterized tests) use tr1/tuple, whose implementation
happens to pull in tr1/functional (that's how gcc implements it).
I think you can workaround the problem by preventing gtest from
including tr1/tuple. The only functionality you'll lose is Combine(),
which is rarely needed. To do that, just define GTEST_HAS_TR1_TUPLE
to 0. Please let me know if that works.
If this indeed fixes it, we can add logic to gtest to do this
automatically.
--
Zhanyong
2009/6/3 Zhanyong Wan (λx.x x) <w...@google.com>:
--
Zhanyong