Ehsan Khodarahmi
Ehsan Khodarahmi

Reputation: 4922

How do compile a project that consists of both C & C++ source files in IAR embedded workbench for ARM?

I've two IAR embedded workbench projects (for Cortex-M3 ARM) which one of them is written in C & the other is written in C++.
I need to combine some files from these two projects to create a single new project & I cannot change language for non of my projects for some reasons (e.g I've used OOP in c++ project & some native c functions in the other one).
Now I'm seeking for a solution to combine these projects & compile it in IAR embedded workbench 6.
Any idea?

Upvotes: 0

Views: 1993

Answers (1)

BЈовић
BЈовић

Reputation: 64223

Compile all c files. Compile all c++ files. Create the main() for your new project, which should be c++. Link all files, and that's it.

Upvotes: 3

Related Questions