We analyze the medium- and long-run effects caused by an inflow of capital into a labor-abundant country. For that purpose, we incorporate directed technical change into a Heckscher-Ohlin model with a continuum of goods. This provides a comprehensive theory explaining the dynamics of comparative advantage based on differences in effective factor endowments, i.e. factor endowments adjusted by differences in technological levels. Our model constitutes an appropriate framework for understanding, e.g., the empirically observed changes in industrial structures of Central and Eastern European countries. Furthermore, we provide a theoretical foundation for the empirical Prospective Comparative Advantage index with new insights into the future dynamics of comparative advantage. Eventually, we show the importance of research spillovers and state dependence on the process of convergence.