I have been having the same problem trying to build an snmp agentx subagent on a Raspberry Pi. Even the basic HelloWorld project causes a SIGILL fault as soon as the net-snmp libraries are included in the link without any attempt to call any snmp functions, and before the main() function entry point is reached.
Because this is on an XP machine I presume the above advice to clear local application data refers to C:Documents and SettingstjLocal SettingsApplication DataVisualGDBRemoteSourceCache192.168.44.50 which had a collection of numbered subdirectories created from an earlier project.
I have deleted all of these and now – although I still get the SIGILL – the program does actually ‘continue’ into the main() function.
The SIGILL occurs in the crypto.so library.
There is no sign of any error if the program is run directly on the Pi