If you’re going to distribute your executable to others you should build a release version.
What error message do you see?
Some things to check:
Have you linked dynamically with the C++ runtime? This will require other people to install the runtime before they use your application. See the following two threads:
Are you building the correct architecture (32 bit vs 64 bit) for other people’s computers?