The actual source code for this experiment is here http://lazyfoo.net/tutorials/SDL/17_mouse_events/index.php
This is simply a project file. Put the entire source from that tutorial (there's a link at the bottom) into the root directory of this and it should compile and run immediately.