You can also use this command line to compile:
gcc example.c -o example -I/Library/Frameworks/Phidget21.framework/Headers -F/Library/Frameworks -framework Phidget21
The -F has the path to your frameworks folder where the Phidget21.framework folder is located.