Hello Bambang,
Thursday, April 04, 2002, 2:13:52 PM, you wrote:

BPDPb> Sudah baca manual gcc? Ada diterangkan sedikit disitu.
BPDPb> Manual  library  yang  bersangkutan  biasanya  juga menyertakan
BPDPb> keterangannya.
BPDPb> --
BPDPb> bpdp

udah di bagian linking option : (ini ya?)
(kalo salah kasi tau dimana letaknya, yg spesifik..jangan cuman man
gcc doang :) )
--------------------------------------------------------------------------
-llibrary
-l library 
Search the library named library when linking. (The second alternative
with  the  library as a separate argument is only for POSIX compliance
and is not recommended.)
It  makes a difference where in the command you write this option; the
linker  searches and processes libraries and object files in the order
they  are  specified.  Thus,  foo.o -lz bar.o searches library z after
file  foo.o but before bar.o. If bar.o refers to functions in z, those
functions may not be loaded.
The  linker  searches  a standard list of directories for the library,
which is actually a file named liblibrary.a. The linker then uses this
file as if it had been specified precisely by name.
The  directories  searched include several standard system directories
plus any that you specify with -L.
Normally  the  files  found  this way are library files--archive files
whose  members are object files. The linker handles an archive file by
scanning  through it for members which define symbols that have so far
been  referenced  but not defined. But if the file that is found is an
ordinary  object  file,  it  is  linked in the usual fashion. The only
difference  between  using  an -l option and specifying a file name is
that  -l  surrounds  library  with  lib  and  .a  and searches several
directories.
-lobjc
You  need  this  special  case  of  the  -l option in order to link an
Objective-C program.
-------------------------------------------------------------------------

tapi  masih  belum  menjawab  bagaimana  mencari nama library tersebut
(misal  kalo  pake math.h kok bisa pake -l m ? dst dst ... atau memang
hanya  ada di manual librarynya dan selalu dicantumkan ?
soalnya  baca  qtdoc, dikasi tau pake -lqt nya di QT-Compiling-How-To,
dan itu ngga jadi satu sama dokumentasinya QT & yg bikin orang lain.
funsi  matematik  di dokumentasi libc juga ngga nyebutin kalau kompile
math.h pakainya -lm.

-- 
Best regards,
 adwin                            


-- 
Utk berhenti langganan, kirim email ke [EMAIL PROTECTED]
Informasi arsip di http://www.linux.or.id/milis.php3

Kirim email ke