I am looking for a C++ library that can tag ogg files easily meaning with a simple function like
write_ogg_tag("file.ogg", tag_data); // where tag_data contains artist, album ...
Is there a solution?
Also, do some of the solutions apply to MP3, FLAC, etc.? (ogg suffices, only asking because I'm curious)
I don't think anything else is better or simpler than TagLib. It applies to all popular formats. You can find details on the API here.
An alternative and much more involved way is using the base components like libogg
and use the low-level format specific API, but that does not seem like what you're looking for.