I am creating ebooks from scratch. I have figured out how to set the cover image, create a NCX and have even added a Linked HTML TOC at the beginning of my book. The problem I am running in to is that when I am viewing my book in the Kindle Previewer and I select the Table of Contents button I get the error "Missing Table of Contents, Your book is currently missing a TOC, which allows easy navigation in Kindle books......" Same goes for the Kindle Fire, when I select the TOC button there is no TOC. Does anyone have any insight on how to do this? Maybe a guide. I am not sure if I am suppose to add a TOC to the .opf or where exactly. Any help would be greatly appreciated.

As far as I know, if you have a built-in TOC in your html file, you have to link it within MobiPocket in the Guide feature. Be sure and bookmark your Table of Contents header name=TOC. Then the line in the Guide will read 'MyBook.html#TOC' This is a pretty elemental way of doing it, so I apologize to all the expert html guys out there, but its worked for me for more than 100 books.

I converted a gnu software manual to mobi format. I generate a toc.html and and a toc.ncx. There isn't much difference between them as to contents. The format and the layout is quite different!
If I use the kindle previewer and press the ncx button I get to see a tree structure with collapsible items.

However on the kindle 3 it is just the html TOC. How do I get to the ncx data on the kindle 3

I do have depth set to 3 in the ncx file. Does the kindle 3 only use level 1?

Not just the Kindle 3, but in fact ALL Kindles (strictly speaking of the mobi format, I believe KF8 is different). The previewer will recognize a multilevel ncx, but only the highest level will be available for navigating with the five-way.

I just checked it. The markers are level one. Once you are at level two left and right stays on level two. You get out of level two by a next/previous page. Well handy to know. I adjust my script to generate 2 levels in the ncx file.

Now I wonder how my toc.html gets nicely indented
I expected something like
1 Makefiles

I didn't had a problem generating a toc. I had difficulty in indenting the toc at level 2.
But there is someone on the internet who explains that with a littlebit
The solution was to add a style file and 2 definitions toc1 toc2 and it worked!