Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

eddyq

macrumors member
Original poster
Jun 10, 2009
96
0
I have included a lot of C source with a CPP project. The C source uses inline in many of the .h files. When I made a project of only C it didn't give any errors but when I added the C files to the CPP project it gave "multiple definitions of symbol xxxx" for each case where it encounters the inline.

I assume this is because the CPP project has different settings and this is not allowed in CPP. Does anyone know how to change the settings so my C files will not cause this linker error?
 

eddyq

macrumors member
Original poster
Jun 10, 2009
96
0
I found out something. You have to use "static inline". I guess that is a C++ thing and once some of the files were C++ then it added that requirement to my C files.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.