UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer ddietrich
Observer
8,906 Views
Registered: ‎07-01-2015

Mixing C and C++ in SDK

I have an SDK project with a collection of older C source code that does not compile correctly with g++.  It compiles fine with gcc.  I want to develop new code in C++ under the same project.  How can I get the SDK environment to use different compilers (or different compiler options) for the two different code blocks?  Another way to think of this is that I have OS and APP source that I want to compile with different options and then linnk together.

os/          <- gcc

app/        <- g++

 

 

0 Kudos
1 Reply
Scholar stephenm
Scholar
8,532 Views
Registered: ‎05-06-2012

Re: Mixing C and C++ in SDK

Use the c++ compiler, and for your c code just use the extern C { place c code here };