Right, but on most other systems, gcc/g++ is already available. What I meant to say was: Even the compiler tool chain is taken care of automatically.
Yes. But be careful. They are not always exactly the same as there C counterparts. And you'd need to put "std::" in front of the functions. So you either use <stdio.h> and printf *OR* you use <cstdio> and std:rintf.
You can also solve this by putting "using namespace std;" at the global scope. This is not advised behavior. But since you are trying to get C code compiled in C++, it is an option.
Also, if you're using C functionality that is differs from C++, you can put an "extern" around it:
Qt Code:
// C++ code extern "C" { // C code } // C++ codeTo copy to clipboard, switch view to plain text mode
This may even be required when creating shared libraries for other C-only applications.
Bookmarks