The GTEST_API_ macro is defined as empty unless one is building with the MSVC
compilers. However, clang and gcc (version >= 4) support the
-fvisibility=hidden command line option which leads to behaviour similar to
MSVC as far as symbol visibility in DSOs is concerned. The current definition
of GTEST_API_ is wrong in this case.
What steps will reproduce the problem?
1. Compile gtest shared libraries with gcc with -fvisibility=hidden
What is the expected output? What do you see instead?
The expected behaviour is to be able to link against libgtest.so and
libgtest_main.so but the observed behavior is a linker error because the
symbols in the gtest API are not exported from the gtest libraries.
What version of Google Test are you using? On what operating system?
1.7 on centos 6 with gcc 4.9
Original issue reported on code.google.com by dmeise...@gmail.com on 5 Aug 2015 at 1:26
Original issue reported on code.google.com by
dmeise...@gmail.com
on 5 Aug 2015 at 1:26