✓Mixing C and C++
Posted: Wed Jun 25, 2014 7:16 pm
I just had the following problem:
I have file.c and file.cpp in my project. So they have the same name with a different extension. Both gets compiled to file.o so one is overriding the other. Is their an option that distinguish file.c from file.cpp like file.c.o and file.cpp.o(there is one in codeblocks)? I know (and I actually did) renaming solves the problem. But I guess it is major problem when you want to mix c++ and c and it took me several hours to recognize this.
Thanks in advance
- Joshua
I have file.c and file.cpp in my project. So they have the same name with a different extension. Both gets compiled to file.o so one is overriding the other. Is their an option that distinguish file.c from file.cpp like file.c.o and file.cpp.o(there is one in codeblocks)? I know (and I actually did) renaming solves the problem. But I guess it is major problem when you want to mix c++ and c and it took me several hours to recognize this.
Thanks in advance
- Joshua