I think there is a little bug in the library makefiles that prevents the inclusion of alt_types.h . It is in one of the topics I sent recently on the forum.
go into components/altera_hal/build/
lib.mk search the line
<div class='quotetop'>QUOTE </div>
--- Quote Start ---
CPPFLAGS += -I.. -I$(GTF_GENERATED)
$(foreach dir, $(HAL_INC_DIRS), -I$(dir))[/b]
--- Quote End ---
and change it in
<div class='quotetop'>QUOTE </div>
--- Quote Start ---
CPPFLAGS += -I..
$(foreach dir, $(HAL_INC_DIRS), -I$(dir))[/b]
--- Quote End ---
...and enjoy :-)
... in general, the standard libraries will allow you to include only the header files into altera_hal and altera_nios2.
If you need more, you need some more hacking in the library makefiles :-)
bye
PJ