Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Oct 2009 21:43:42 +0100
From:      Florian Loeber <f.loeber@googlemail.com>
To:        Oliver Mahmoudi <olivermahmoudi@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: writing a FreeBSD C library
Message-ID:  <b2c7050e0910261343r7b5d4970of62d7699fcce8c21@mail.gmail.com>
In-Reply-To: <6b4b2d2c0910261308i367569dbg887d7c713bf20ad1@mail.gmail.com>
References:  <6b4b2d2c0910261308i367569dbg887d7c713bf20ad1@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

you have to link your executable to your library.
The command-line option is -l.

% gcc -o testfile -lmylib source.c

Without it, your program doesn't know that this library exists
(somewhere, /usr/lib, ...)

Regards,
Florian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b2c7050e0910261343r7b5d4970of62d7699fcce8c21>