The 21-year-old Castro has played two seasons for the Cubs, compiling a .304 batting average with 13 home runs and 107 RBI.
Samardzija, a fifth-round pick in 2006, went 8-4 last season with the Cubs, posting a 2.97 earned run average and 87 strikeouts in 75 appearances out of the bullpen.
For his career, the former wide receiver from Notre Dame holds a 12-9 record with a 4.40 ERA and 142 strikeouts in 128 games (five starts).
Darwin Barney, who started 124 games at second base in 2011, also received a contract. Barney played in 143 games last season, hitting .276 while knocking in 43 runs and swiping nine bases.
Travis Wood and Dave Sappelt, both acquired from Cincinnati in December, were also signed.
Sappelt, Cincinnati's 2010 Minor League Hitter of the Year, made his major league debut last season and hit .243 in 38 games with the Reds.
Wood has spent two seasons in the majors with the Reds, compiling an 11-10 record and a 4.18 ERA in 39 games (35 starts).