From: Andrey Rybak <ra@iop.kiev.ua>
To: community@altlinux.ru
Subject: Re: [Comm] Re: gcc
Date: Fri, 16 May 2003 11:24:09 +0300
Message-ID: <3EC4A029.8060704@iop.kiev.ua> (raw)
In-Reply-To: <20030515190441.GA1738@solemn.turbinal.org>
Alexey Tourbin wrote:
>On Thu, May 15, 2003 at 09:10:07PM +0300, Andrey Rybak wrote:
>
>
>>На старости лет обнаружил, что не умею пользоваться gcc.
>>Подскажите, как скомпилировать программу с вызовами функций sqrt(),
>>exp(), sin() и иже с ними без сообщений компиллятора:
>>/home/andrey/tmp/cctwjuhg.o(.text+0x2c): undefined reference to `sqrt'
>>/home/andrey/tmp/cctwjuhg.o(.text+0x4c): undefined reference to `pow'
>>/home/andrey/tmp/cctwjuhg.o(.text+0x7a): undefined reference to `exp'
>>
>>
>
>-lm
>
>
>
>>#include<math.h> есть.
>>сам файл math.h есть (по тому же пути где и stdio.h), причем подобных
>>ошибок для функций printf(), puts() etc. не наблюдается. Мало того, и
>>программы с использованием функций, объявленных в stdio.h работают
>>корректно. Помогите, пожалуйста.
>>
>>
>
>Потому что -lc влинковывается по умолчанию.
>
>
Спасибо, работает.
Т.к. хидеров много, и, очевидно, подобных затруднений будет много, а в
мане gcc я этих ключиков не увидел, то подскажите еще, где найти как
можно более полный справочный материал по gcc.
next prev parent reply other threads:[~2003-05-16 8:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-15 18:10 [Comm] gcc Andrey Rybak
2003-05-15 19:04 ` [Comm] gcc Alexey Tourbin
2003-05-16 8:24 ` Andrey Rybak [this message]
2003-05-16 13:25 ` Alexey Tourbin
2003-05-16 13:57 ` Andrey Rybak
2003-05-16 19:48 ` Alexey Tourbin
2003-05-19 11:17 ` Andrey Rybak
2003-05-19 12:08 ` Alexey Tourbin
2003-05-16 22:29 ` Andrey Golovin
2003-05-17 0:32 ` Alexey Tourbin
2003-05-17 11:51 ` Andrey Golovin
2003-05-17 13:45 ` Vitaly Lugovsky
2003-05-17 13:50 ` Alexey Tourbin
2003-05-17 13:39 ` Vitaly Lugovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3EC4A029.8060704@iop.kiev.ua \
--to=ra@iop.kiev.ua \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git