Diabetes drugmaker Amylin Pharmaceuticals ( AMLN) reported second-quarter financial results that were better than Wall Street had expected.

The San Diego-based company lost $46.4 million, or 38 cents a share, on revenue of $118.1 million. Analysts expected a loss of 46 cents a share on revenue of $104.1 million, according to Thomson First Call.

For the three months ended June 30, Amylin's loss included $12.4 million, or 10 cents a share, for noncash, stock-based compensation expenses, the company said Monday.

Amylin lost $26.6 million, or 26 cents a share, on revenue of $46.8 million in last year's second quarter. The company's latest quarter had a higher loss primarily because of the extra costs of launching its diabetes drugs, Byetta and Symlin. Selling, general and administrative expenses climbed to $63.5 million from $42.3 million a year ago.

Most of Amylin's revenue comes from Byetta, the twice-daily injectable drug that it sells with Eli Lilly ( LLY). Byetta contributed $98.6 million of sales for the second quarter.

Amylin's other revenue comes from Symlin, which it markets by itself, and from collaboration deals with other companies. Amylin also is holding midstage clinical testing for drugs to fight obesity and to treat congestive heart failure.

Research and development expenses nearly doubled to $50.4 million, in part because of work on a version of Byetta that can be injected weekly. Amylin is collaborating with Lilly and Alkermes ( ALKS) on the project.

Amylin's results were issued after markets had closed. In regular trading, Amylin's stock closed up 73 cents, or 1.6%, to $46.44. After hours, the stock gained $1.46.