add errors in case some target defines were not set properly
Merge pull request #222 from mazgch/master

add errors in case some target defines were not set properly