Not sure what OS you're using.. but if it's Ubuntu, I use CodeBlocks on Ubuntu and have had this exact problem MANY times.
The "user" option (in etc/fstab) by default sets up "noexec".
so in /etc/fstab just add ,exec after user. i.e. mine looks like this:
/dev/sda6 /media/DATA vfat uid=kenny,gid=kenny,users,user,exec 0 0
Though, the spacingis a bit off... but you get the idea.
This may be a bit tough if you're new to linux. So google about the fstab file.
Also, make back up before you try to edit anything (sudo cp /etc/fstab /etc/fstab.backup
)
sudo gedit /etc/fstab
will open up the fstab file so you can see if the filesystem has exec
in it