Reputation: 18221
I'm working on c++ project. One of my project files has extension c
. Will compiler compile whole project using c++
or it will compile c++
files an c file separately and then link them somehow?
my c file contains code:
#ifdef __cplusplus
extern "C" {
#endif
How compiler will deal with c
file in case I set Compile as C++ Code(/TP)
?
Upvotes: 0
Views: 97
Reputation: 9340
From MSDN, looks like the 2nd option (.cpp as c++, .c as c). However, if you force with command line option, then it will follow the command line option. Note the case sensitivity of c and p after -T, it could mean ALL files or just the following file as described here.
Upvotes: 1