Massive stars (> 20 3,/o) release a considerable amount of mechanical energy in the form of strong stellar winds. A fraction of this energy may be transferred to relativistic cosmic rays by diffusive shock acceleration at the wind boundary, and/or in the expanding, turbulent wind itself. Massive stars are most frequently found in OB associations, surrounded by H II regions lying at the edge of dense molecular clouds. The interaction of the freshly accelerated particles with matter gives rise to ~/-ray emission. In this paper, we first briefly review the current knowledge on the energetics of strong stellar winds from O and Wolf-Rayet stars, as well as from T Tauri stars. Taking into account the finite lifetime of these stars, we then proceed to show that stellar winds dominate the energetics of OB associations during the first 4 to 6 million years, after which supernovae take over. In the solar neighborhood, the star formation rate is constant, and a steady-state situation prevails, in which the supernova contribution is found to be dominant. A small, but meaningful fraction of the COS-B 7-ray sources may be fueled by WR and O stellar winds in OB associations, while the power released by T Tauri stars alone is perhaps insufficient to account for the y-ray emission of nearby dark clouds. Finally, we discuss some controversial aspects of the physics of particle acceleration by stellar winds.