To enable your application to find the desktop include files, add:
-I/usr/dt/include
to each makefile's compile line.