Error: ptrdiff_t does not name a type

If you are receiving this error msg compiling Android:

external/gtest/src/../include/gtest/internal/gtest-param-util.h:122:11: error: ‘ptrdiff_t’ does not name a type

Then just add “#include <cstddef>” inside these files:

external/gtest/include/gtest/internal/gtest-param-util.h
external/chromium/testing/gtest/include/gtest/internal/gtest-param-util.h
external/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h
external/protobuf/gtest/include/gtest/internal/gtest-param-util.h

Source: https://groups.google.com/forum/#!msg/android-building/AgeruY7XIwQ/5_GiCN9UtLUJ

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s