The enabling one-bead-one-compound combinatorial library method allows us to rapidly develop optical probes and cancer targeting agents for cell surface receptors. The targeting agents can be incorporated into the novel nanocarriers for delivery of theranostic agents against cancer.