zhoushun / googletest

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

Linking error in google-test sample using arm platform #497

Open GoogleCodeExporter opened 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. Build libgtest.a static library using arm toolchanim.
2. Change build.gradle file according to arm toolchain,(Refer attached file)
3. $gradle build, to build the google-test sample.

What is the expected output? What do you see instead?
google-test sample should build with arm platform same as x86 plateform. But, 
its give linking error as below:

=============================================
`build@snappro-build:~/google-test$ gradle build
:compileFailingOperatorsSharedLibraryOperatorsCpp
:linkFailingOperatorsSharedLibrary
:failingOperatorsSharedLibrary
:compileFailingOperatorsStaticLibraryOperatorsCpp
:createFailingOperatorsStaticLibrary
:failingOperatorsStaticLibrary
:compileFailingOperatorsTestGoogleTestExeOperatorsCpp
:compileFailingOperatorsTestGoogleTestExeOperatorsTestCpp
:linkFailingOperatorsTestGoogleTestExe
/home/build/google-test/build/objs/operatorsTestGoogleTestExe/failing/operatorsT
estCpp/amp5iswcui5p9bl2w9yf2xmbg/test_plus.o
: In function `__static_initialization_and_destruction_0(int, int)':
test_plus.cpp:(.text+0x4b8): undefined reference to 
`testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char 
const*, char const*, void const*, void (*
)(), void (*)(), testing::internal::TestFactoryBase*)'
/home/build/google-test/build/objs/operatorsTestGoogleTestExe/failing/operatorsT
estCpp/2potarenow2sn212d22q3bhj9/test_minus.
o: In function `__static_initialization_and_destruction_0(int, int)':
test_minus.cpp:(.text+0x4b8): undefined reference to 
`testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char 
const*, char const*, void const*, void (
*)(), void (*)(), testing::internal::TestFactoryBase*)'
collect2: ld returned 1 exit status

:linkFailingOperatorsTestGoogleTestExe FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':linkFailingOperatorsTestGoogleTestExe'.
> A build operation failed.
      Linker failed while linking operatorsTest.
  See the complete log at: file:///home/build/google-test/build/tmp/linkFailingOperatorsTestGoogleTestExe/output.txt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output.

BUILD FAILED

Total time: 4.365 secs`
================================

What version of Google Test are you using? On what operating system?
gtest-1.7.0 on Ubuntu 12.04.5 LTS

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

Original issue reported on code.google.com by ab.bo...@gmail.com on 5 Aug 2015 at 8:09

Attachments: