0

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) ?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.