So I'm getting undefined reference to testing::UnitTest::Run()
along with some others with gtest. I've compiled the libraries (libgtest.a
and libgtest_main.a
) and placed them in my lib folder for MinGW and got no where.
Here is my CMakeList.txt
:
cmake_minimum_required(VERSION 3.2)
project(proj_tests)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
include_directories("E:/Git/proj")
include_directories("D:/Development/Libraries/gtest-1.7.0/include")
find_package(gtest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})
add_executable(proj_tests ${SOURCE_FILES} containers/proj_test.h)
target_link_libraries(proj_tests ${GTEST_LIBRARIES} pthread)
I have done make
on the gtest sample and was able to run that without any issues.
I'm using CLion on Windows 7 for the project. How can I make this Google Test framework thing work properly?