Sorry to necro this post, but I believe it is SOMEWHAT pertaining to this issue and I can't find much else about it.
I just started using the Netbeans and I believe I've had a similar issue where NetBeans won't allow me to add my executable to the 'Run' config because it is not detected as an executable. I have found a workaround (consisting partially of the -no-pie resolve posted above) that allows you to keep building as PIE, but still allows you to add the executable to the Run command (not sure if this will help in this situation, but I'm trying anyway) and I'm really not sure where I should post and this was one the only comprehensible posts I found about this issue.
The steps are as follows (part of my Twitter post):
- Add -no-pie to your g++/make/cmake build command/config for the 1st build.
- Build once.
- Add the newly built exe to the NB Run config.
- Remove -no-pie from your command/config.
- Clean and rebuild.
The Run command/button should now work even as PIE and I hope it helps in other similar situations.
Hope this helps someone.