Question

Trying to set up an embedded TDD environment in Eclipse:

  • Application Project set up for GNU-ARM cross-compilation
  • CppUTest Project to build CppUTest via Cygwin (working great)
  • Test Project to house unit tests, test groups, test runner

Trouble I'm having is that the Test Project builds its unit tests into .o files, but won't build the tested .h/.c files, so the linker fails on undefined references to the missing objects.

I can't depend on the object files from the Application project, or that project's builds, because they're cross-compiled to ARM EABI objects. I need the Test Project to also build the Application project's source files. Is there a way to tell Eclipse to do this, or do I need to set up a pre-build script to copy the tested files into a source tree within the Test Project?

No correct solution

OTHER TIPS

I was able to get this working by linking the Application Project's source tree into my Test Project's list of source locations under: Test Project --> Properties --> C/C++ General --> Paths and Symbols --> Source Location.

The downside to this approach is that unless both the Application and Test Projects are inside the Eclipse workspace, an absolute path is required to add the source location.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top