# Compile and run from command prompt

**URL:** <https://root-forum.cern.ch/t/compile-and-run-from-command-prompt/13799>\
**Category:** ROOT\
**Created:** [February 16, 2012, 1:42pm UTC](https://root-forum.cern.ch/t/compile-and-run-from-command-prompt/13799 "2012-02-16T13:42:05Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Alkass](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@Alkass](https://root-forum.cern.ch/u/Alkass)\
**Post date:** [February 16, 2012, 1:42pm UTC](https://root-forum.cern.ch/t/compile-and-run-from-command-prompt/13799/1 "2012-02-16T13:42:05Z")

</div>

Hi

I apologize if my question is stupid, but here it is 😉

After making the class from the root file, I have the .C and .h files – Is there any way to compile and run “Loop()” from command block rather than everytime having to

[quote]root -l macro.C  
macro m  
m.Loop();  
[/quote]

Thanks

Alex

---

_[View the full topic](https://root-forum.cern.ch/t/compile-and-run-from-command-prompt/13799)._
