Mixing Source Files

closed account (zb0S216C)
A quick and simple question. If I mixed C++ source files and C source files, what will happen? Will the C source files compile under C not C++?

This is just an experiment, by the way.
It's very difficult to answer that question without knowing something about your build environment. Most Make-based systems will chose the compiler based on the file extension, compiling .c code with a C compiler and .C, .cxx and .cpp code with your C++ compiler.
i can anser for framework here! he sed he uses somethin called gnu and codeblocks?
If you mix C and C++ source files, you might want to pay attention to C++ compilers' tendencies to mangle names...
http://en.wikipedia.org/wiki/Name_mangling#Name_mangling_in_C.2B.2B

-Albatross
Last edited on
Topic archived. No new replies allowed.