For example I have 100 *.c files.
50 of them have to compile as c++.
Can it be solved without file renaming?


26 July 2021, 15:35:18, by "René Ferdinand Rivera Morell" <grafikrobot@gmail.com>:



On Mon, Jul 26, 2021 at 4:20 AM Roman Matsybora via Boost-build <boost-build@lists.boost.org> wrote:
Hello,
Some part of c files need to be compiled as c++ but another part of *.c files stay with c.
Is there some general solution or may be tool dependent?
Currently using Visual Studio 2017-2019.
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build

#ifdef __cplusplus__
// C++ code
#else
/* C code */
#endif

And build the source twice.

--
-- René Ferdinand Rivera Morell
-- Don't Assume Anything  -- No Supone Nada
-- Robot Dreams - http://robot-dreams.net