fixed headers and library linking