Andes Workshop

It is currently Fri Mar 29, 2024 5:04 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: .o檔(object file)編譯的方法(2012.3.23更新)
PostPosted: Tue Nov 29, 2011 5:41 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
在AndeSight的project裡如果要加入.o檔一起compile,
可以用下面的方法。

下圖中,我們有一個.o檔要一起編譯。
Attachment:
p1.gif
p1.gif [ 4.63 KiB | Viewed 7052 times ]


下面是相對路徑的寫法,加在linker選項裡,
建議用這種寫法,具有可攜性,到其他user的電腦裡直接import就可以使用。
路徑的寫法是相對於makefile的位置。
Attachment:
p3.gif
p3.gif [ 14.78 KiB | Viewed 7052 times ]


這是另一種寫法,採用絕對路徑。
注意,這是cygwin的path。
Attachment:
p2.gif
p2.gif [ 22.16 KiB | Viewed 7052 times ]


下面是example code
Attachment:
Hello1.zip [39.7 KiB]
Downloaded 701 times




我們建議將.o檔編譯static library。
可參考下面的pdf檔。
Attachment:
靜態函式庫建立與使用.pdf [915.63 KiB]
Downloaded 841 times


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group