ddavis2speedray / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

solaris ld warning #432

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
IMPORTANT NOTE: PLEASE send issues or requests to
http://groups.google.com/group/googletestframework *instead of here*.
This issue tracker is NOT regularly monitored.

If you really need to create a new issue, please provide the information
asked for below.

What steps will reproduce the problem?
1. make my program
2. compile source code
=============================================================
..
...
gcc -c -D_FILE_OFFSET_BITS=64 -m32 -g -Wall -Wno-format `xml2-config --cflags` 
-D__EXTENSIONS__ -DBSD_COMP -D_TEST -I./external_library/gtest/solaris/include 
-fprofile-arcs -ftest-coverage -o main.o main.c
...
..
=============================================================
3. g++ -o test_gtest main.o ... -L./external_library/gtest/solaris -lgtest
- but not running
help~!

What is the expected output? What do you see instead?

ld: warning: file ./external_library/gtest/solaris/libgtest.a(gtest-all.o): 
wrong ELF class: ELFCLASS64
Undefined                       first referenced
 symbol                             in file
testing::internal::IsTrue(bool)     test/my_math_test.o
testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, 
char const*, int, char const*)test/my_math_test.o
testing::Test::TearDown()           test/my_math_test.o
typeinfo for testing::Test          test/my_math_test.o
testing::internal::AssertHelper::~AssertHelper()test/my_math_test.o
testing::UnitTest::Run()            test/gtest_main.o
testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char 
const*, char const*, void const*, void (*)(), void (*)(), 
testing::internal::TestFactoryBase*)test/my_math_test.o
testing::AssertionSuccess()         test/my_math_test.o
testing::internal::CmpHelperSTREQ(char const*, char const*, char const*, char 
const*)test/machine_test.o
testing::Test::Test()               test/my_math_test.o
testing::Test::~Test()              test/my_math_test.o
testing::internal::EqFailure(char const*, char const*, 
testing::internal::String const&, testing::internal::String const&, 
bool)test/my_math_test.o
testing::InitGoogleTest(int*, char**)test/gtest_main.o
testing::Test::SetUp()              test/my_math_test.o
.....
...
ld: fatal: symbol referencing errors.

What version of Google Test are you using? On what operating system?
SunOS xxxx 5.10 Generic_147440-12 sun4u sparc SUNW,Sun-Fire-15000

Please provide any additional information below, such as a code snippet.

Original issue reported on code.google.com by hoochim...@gmail.com on 6 May 2013 at 11:07

GoogleCodeExporter commented 9 years ago
do not run solaris??

Original comment by hoochim...@gmail.com on 6 May 2013 at 11:10

GoogleCodeExporter commented 9 years ago
You should compile Google Test along with your tests. See 
https://code.google.com/p/googletest/wiki/FAQ#Why_is_it_not_recommended_to_insta
ll_a_pre-compiled_copy_of_Goog for more info.

Original comment by vladlosev on 7 May 2013 at 1:43

GoogleCodeExporter commented 9 years ago
Thank u very much. I have solved this problem. 

Original comment by hoochim...@gmail.com on 7 May 2013 at 2:15