Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for mixed C/C++ environment #570

Merged
merged 1 commit into from
Jul 15, 2021

Conversation

DanieleNardi
Copy link
Contributor

I'm working on a mixed C and C++ project, in particular I'm integrating a third party C-language library to our C++ base code. I wrote a couple of failing test cases, generated mocks with CMocks, generated runner with Unity and compiled: g++ for C++, gcc for C. Linking failed, whether I compile runner with gcc or g++.
The problem was on the runner generation process, which gets the headers included in my C++ file into the runner, so linker can't find proper associations.
I solved the issue adding a new option into generate runner script, "externcincludes", that allow to add the extern "C" { } around unity and cmock header files, then compile runner with g++.

@mvandervoord mvandervoord merged commit aeed24c into ThrowTheSwitch:master Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants