我有一个使用unittest的应用程序,用gtest编写。我的应用程序在Windows平台上运行良好,几天前我尝试在linux平台上运行应用程序。使用的Linux具有以下配置:
cat /etc/*-release
Cluster Manager v7.2
slave
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.7 (Santiago)
Red Hat Enterprise Linux Server release 6.7 (Santiago)
我开始构建我的应用程序,对于构建我们使用cmake,它还包括来自gcc的cmake:
add_subdirectory(/path/gtest/ ${PROJECT_BINARY_DIR})
add_executable(myApplication ${SOURCES})
add_dependencies(myApplication tinyxml2 gtest)
target_link_libraries(myApplication tinyxml2 gtest ${CMAKE_DL_LIBS})
在应用程序构建期间,我没有任何错误。构建后我尝试执行应用程序并出现错误:分段错误 在分析过程中,我发现myApplication和gtest有不同的OS / ABI版本:
你知道我怎么解决这个问题吗?
GCC版本:4.8.2