Can't find files of cxxtest when I'm trying to run compiled file

771 views Asked by At

I started writing a small project on C++. I just wanted to develop using TDD because in Java I always do that. I faced a problem that using any libraries and so on is a bit easier in Java IDEs and tools (like maven and so on). But it's not exactly topic I'm talking about.

I found cxxtest framework and decided to add one into my project. I added the latest version of sources exactly into my test package in project, then I write simple test, and then I ran preprocessor (using python) by "python cxxtestgen --error-printer -o ../runner.cpp ../../testSample.h" from cxxtest-4.4/bin folder.

After that I got the runner.cpp file into cxxtest-4.4 folder. I tried to run that using command "g++ -o runner runner.cpp" in suitable place...and got the following message:

bash-3.2$ g++ -o runner runner.cpp
runner.cpp:8:10: error: 'cxxtest/TestListener.h' file not found with <angled> include; use "quotes" instead
#include <cxxtest/TestListener.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~
         "cxxtest/TestListener.h"
In file included from runner.cpp:8:
./cxxtest/TestListener.h:24:10: fatal error: 'cxxtest/Descriptions.h' file not found
#include <cxxtest/Descriptions.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~

Here I put my project structure: The project structure

It seems very strange because I've never seen the same troubles before. And it's not able to find same issues.

So, would be great if somebody told my even right direction to fix this problem. Let me know If you need something else to make more clear understanding of this problem (code, any technical info, etc)

Some info: I'm using CLion on macOS, it means I have CMake (version 3.6 at least), I have both perl and python on my mac. Project with C++14 language version.

0

There are 0 answers