This study presents a novel framework for the study of endogenous network growth subject to constraints. The literature on strategic network formation analysed the specific case of positive constraints: in the present work, the model is extended to constraints which can be negative and change in time depending on the actions of the agents. A characterisation of stable networks in the static case is provided, and it is proved that finding them is computationally difficult unless specific assumptions are made. The framework can be applied to contexts in which the formation of a link inhibits or implies the formation of another one, typically due to time, space or capacity constraints. Two specific examples are investigated, highlighting the importance of modelling constraints in order to obtain credible simulations and null models: the network of corporate control and the network of citations among scientific papers.