"Not working" is a very bad error description - it really tells us nothing.
However one thing that stands out is that your main function has no main loop - something that is essential for any embedded system: it has to keep running 'forever'.
In your case, you seem to set everything up (although it is impossible to tell with out the full code, including the config options) so adding a simple "while(1);' as the last statement is probably what you need.
I' not certain about the 'mikroC' runtime, but may C runtimes will take the exit from the 'main' function as an indication of something going very wrong and will then reset and reinitialise the whole MCU before starting again. If that is the case then you re simply in a continuous loop of resetting the MCU, running your code before resetting again. Therefore the PWM never gets a chance to do anything.
Susan