ld的問題 - Linux

By Megan
at 2008-11-21T12:41
at 2008-11-21T12:41
Table of Contents
我寫了一個簡單的pthread problem
通常是要用 $>cc -lpthread pthread.c 來產生executable
那如果我想link時用ld的話
$>cc -c pthread.c
$>ld --entry=main -lpthread pthread.o -o pthread
但其實這樣並不能執行
$>file pthread
pthread: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), not stripped
通常正常的結果會是
: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux
2.6.8, dynamically linked (uses shared libs), not stripped
請問ld是還要加什麼東西呢???
thanks
--
Tags:
Linux
All Comments

By Tristan Cohan
at 2008-11-22T22:49
at 2008-11-22T22:49
Related Posts
如何將window裡的IE網頁備份到linux的書籤

By Ula
at 2008-11-21T11:20
at 2008-11-21T11:20
如何將window裡的IE網頁備份到linux的書籤

By Ivy
at 2008-11-21T10:56
at 2008-11-21T10:56
有沒有都是小遊戲的distribution?

By Harry
at 2008-11-21T10:11
at 2008-11-21T10:11
archlinux

By Eartha
at 2008-11-21T01:01
at 2008-11-21T01:01
Asus DVD mount 不上來

By Jack
at 2008-11-21T00:59
at 2008-11-21T00:59