Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

calling g++ in order to run a part of function and return the compiled out from it

15 views
Skip to first unread message

kushal bhattacharya

unread,
Aug 9, 2017, 8:59:22 AM8/9/17
to
Hi,
Is there any facility in c++,where suppose i have a function say do_something();
I want to get the compiled out of that function which has the related instruction within it including the error or warning message or the success message if that function was compiled correctly,Can i do that?
Thanks

Öö Tiib

unread,
Aug 9, 2017, 9:48:15 AM8/9/17
to
AFAIK you can't request C++ compilers to compile just one function and nothing
else. The "compilation unit" of C++ is one file with everything that it does #include
preprocessed into it. But if you want to make such a tool then feel free. Lot of C++
compilers (including clang and g++) are open source.
0 new messages