If the library does not exist, but Dev-Cpp works fine, then Dev-Cpp has one additional library search path where it finds that library.
However, from the error message ("cannot find -lwxmsw"), there is an entirely different problem, too.
If that is the exact error message that you get, you entered -lwxmsw into the link libraries field, which is simply wrong. That will call ld with -l-lwxmsw, which will obviously not work regardless of library paths.
If it was only about library paths, the message would be "cannot find wxmsw".