google / google/googletest

Gmock Linking Error

Open
#4,201 0 comments 0 reactions 1 assignee Claimed by @asoffer View on GitHub
Dominant language
C++
Stars
39.5k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

### Describe the issue

I am using Gtest and Gmock with MingW, The following linking error is occurring for me.

### Steps to reproduce the problem

undefined reference to 'testing::internal::GetWithouMatchers();
undefined reference to 'testing::internal::UntypedFunctionMockBase();

etc...

### What version of GoogleTest are you using?

Cmake Command : g++ testRunner.cpp -lgtest -lgmock -lpthread -lgtest_main -lgmock_main

### What operating system and version are you using?

Mingw

### What compiler and version are you using?

g++ testRunner.cpp -lgtest -lgmock -lpthread -lgtest_main -lgmock_main

### What build system are you using?

Cmake version (3.7)

### Additional context

undefined reference to 'testing::internal::GetWithouMatchers();
undefined reference to 'testing::internal::UntypedFunctionMockBase();

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.