First, clean the SDK target.
Then, go through
Project > Build options > Build targets. Now select SDK target and check for the following options on the right.
1) Auto-generate filename prefix.
2) Auto-generate filename extension.
If they are unchecked check them and now build C::B. Now it should link properly.