CALENDAR

2008年3月
« 2月   4月 »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

CATEGORIES

ARCHIVES

あわせて読みたい

  • LOADING...

libevent + static link

libevent をスタティックリンクでコンパイルする方法をメモ。

標準の configure オプションで shared, static ともに有効になってる。

なので configure オプションは変更なし。

./configure --prefix=/usr/local/libevent

shared が気になるときは

./configure --prefix=/usr/local/libevent --disable-shared

とすればOK。

make
make install

これでインストールまで完了。

続いてMakefile

main.o の後ろに /usr/local/libevent/lib/libevent.a をひっつける。

環境によっては make 時にエラーが出るっぽい。
CentOS5 で試したときは LIBS に -lrt を追加してあげないとエラーになった。

Makefile

一応 サンプル

  • このエントリーをはてなブックマークに追加
  • はてなブックマーク - libevent + static link
  • Share on Facebook
  • Post to Google Buzz
  • Bookmark this on Yahoo Bookmark
  • Bookmark this on Livedoor Clip
  • Share on FriendFeed

関連エントリー:

libevent + チャットサーバ

libevent + 使い方

autotools + config.nice

autotools + with-mysql

Automake + 条件コンパイル

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt=""> <pre lang="" line="" escaped="">