I'm not familiar with wxwidgets specifically but typically C/C++ code is portable. BUT it really depends on the library. You'd have to check wxwidgets to see what OS it supports. Typically it should be fairly portable across at least Linux distros though. Ex: if you use Debian it should work in Fedora.
I find the more libraries you use the more complicated things can get though, like on one system the library may not be at the same location as on another system, and all hell breaks loose. This is where dependancy hell comes in.