EXHIBIT 23.1 CONSENT OF ERNST & YOUNG LLP, INDEPENDENT AUDITORS We consent to the reference to our firm under the caption "Experts" in Amendment No. 1 to the Registration Statement (Form S-3) and related Prospectus of Vyrex Corporation for the registration of 1,647,030 shares of its common stock and to the incorporation by reference therein of our report dated March 3, 1997, with respect to the financial statements of Vyrex Corporation included in its Annual Report (Form 10-KSB) for the year ended December 31, 1996, filed with the Securities and Exchange Commission. /s/ ERNST & YOUNG LLP ------------------------------- Ernst & Young LLP San Diego, California January 13, 1998