NES to SNES involved Nintendo being incredibly heavy handed when it came to licensing to third parties. N64, the costs of making games went up whereas they were (due to media type) far less expensive on the competition (in some ways, it was like the PS3 of its generation). They also did little to avert the image that Sega's advertising had bestowed upon them. That last bit is always an uphill struggle.
Gamecube's lower third party support was a result of the above paragraph. When your mindshare has eroded, you have to earn your way back. Nintendo did make some attempts (such as with the mostly disastrous "Capcom Five"), but there wasn't yet enough impetus to get third parties back onboard, as they were completely comfortable working primarily with the PS2 (in the case of Microsoft, they were helped out by allegedly tons of moneyhatting and the fact that many, many game developers already made games for another of their platforms, and it was easy to shift over, given the commonality in API).
Getting third parties is something that Nintendo just has to keep trying at, and every generation they'll get more if they keep up the pressure without doing things that are too off-putting. Uphill struggle. I submit that even though the Wii has a pretty bad stereotype with regards to third party games, it still had a far better third party ecosystem than the GameCube's. My suspicion is that the Wii U's will start out better than both.