You can run an application compiled for one Linux distribution on any other distribution, as long as that other distribution has the required libraries available. The problem in practice is usually that different distributions ship different versions of libraries at a given point in time.
Linking libraries statically is a bad idea. It bloats the application file size (not much of a concern in most cases, except for people with little Internet bandwidth), bloats the application size in memory (that's more of a concern in practice), and means that your application will stay stuck with all the bugs from the version you linked with. Link your libraries dynamically so that your users will benefit from the bug fixes to the libraries, especially the security fixes.
Furthermore, while you can run applications, there's the problem of packaging. Installing applications manually is a pain. If you don't distribute an RPM package for CentOS, and a deb package for Ubuntu, you do your users a disservice.
So you should generate proper packages for all distributions. You can run an application built for Ubuntu on CentOS, with more or less effort depending on library requirements, but you can't deploy an application built for Ubuntu on CentOS.