All gazebo plugins are in C++; there is no plugin language. Any file can be included as long as you make sure the file is in your include path. In your CMakeLists.txt this is done using include_directories. In the case of source files you'll have to make sure all are listed in the call to add_library.
You won't be able to call or run your main function. main as a symbol is already defined by the gazebo executable. You should treat the Load() method on the plugin as the entry point.