-1

There are several examples how to setup GTest application on windows using mingw64. But they are all very simple - one source C file being tested by one C++ test file. Does anyone have an example setup with multiple C source files being test and then wrapped into a simple application? This is the directory structure:

./fancy_lib/
├── CMakeLists.txt
├── fancy_lib.h
├── src
│   ├── common.c
│   ├── common.h
│   ├── maths.c
│   ├── maths.h
│   ├── parameter.c
│   ├── parameter.h
│   ├── svpwm.c
│   └── svpwm.h
└── test
    ├── CMakeLists.txt
    ├── common_test.cpp
    ├── maths_test.cpp
    ├── parameter_test.cpp
    └── svpwm_test.cpp

The reason I'm asking is that I'm running into the multiple definition of __debugbreak and __fastfail. Everything compiles if there is only one test file. But once more tests are added, the linking fails.

ilya1725
  • 4,496
  • 7
  • 43
  • 68
  • Don't ask your question multiple times. [Mingw64 compiler adds \_\_debugbreak and \_\_fastfail to each source file error](https://stackoverflow.com/questions/75679736/mingw64-compiler-adds-debugbreak-and-fastfail-to-each-source-file-error) – 273K Mar 10 '23 at 15:18

0 Answers0