This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

compiling c and c++ source same time


Hello,
 I have a requirement that if a directory contains
c and c++ sources, c files will be compiled by c
compiler and c++ by c++ compiler. I can handle it
through script, but I am curious to know if I use
gcc for compiling all files and g++ for linking all
object files, can gcc handle compilation of c++ files
for all scenario. In gcc manuals it says
"GCC recognizes files with these names and compiles
them as C++ programs ... However, C++ programs often
require ... a compiler that understands the C++
language". Does it mean, compiling (not linking) a c++
file by gcc and by g++ is not same thing ?
 Thanks in advance.
-
Suman Kumar Ray

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]