The density profiles of square-well chain fluid confined in two planar walls are calculated using density-functional theory based on the weighted-density appro ximation of Yethiraj. The free energy functional of the system consists of an id eal part and excess part. We obtain the excess part by the equation of state of corresponding uniform system combined with the weighted-density approximation. We adopted respectively the equations of state based on cavity correlation fun ction and the statistically associating fluid theory. The calculated density pro files are compared with the corresponding Monte Carlo simulation data at differe nt chain lengths, temperatures, volume fractions and different attractions of t he wall. For a square-well chain fluid confined in two hard planar walls, result s from both equations of state are in good agreement with that of the Monte Car lo simulations at high temperature and high volume fraction. Both results devia te from the Monte Carlo result at low temperature and low volume fraction. The density profile in hard wall slit pore calculated from the equation of state of SAFT-VR is in better agreement with the available simulation data than that fro m the equation of state developed by Liu et al. We find that the equation of st ate has significant influence on theoretical prediction. For the walls with attr active forces, predictions from both equations of state deviate from the simula tion data. This deviation results from the increasing non-uniformity of the flu ids. Therefore, more suitable weighted-density function is needed to improve the density-functional theory.