ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Bergman Andrey <vkni@yandex.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] Отсутствующие функции fmod, clock_getres в -lm, -lrt (пакеты glibc-core, glibc-pthread)
Date: Wed, 01 Dec 2010 18:01:49 +0300
Message-ID: <706911291215709@web108.yandex.ru> (raw)
In-Reply-To: <20101201132323.GC20288@altlinux.org>

Дмитрий, я взял программу

#include <math.h>

int main( int argc, char ** argv)
{
    return fmod( (float)8.0, (float)9.9);
}

Компилировал с помощью

$ gcc -lm -lrt a.c 
/home/vkni/tmp/ccPtBF9p.o: In function `main':
a.c:(.text+0x41): undefined reference to `fmod'
collect2: ld returned 1 exit status

--------------
findsym показывает, что функция fmod на месте.

Андрей.

01.12.2010, 16:23, "Dmitry V. Levin" <ldv@altlinux.org>:
> On Wed, Dec 01, 2010 at 01:10:16PM +0600, REAL wrote:
>
>>  01.12.2010 12:00, Bergman Andrey пишет:
>>> возясь с С-шным кодом я внезапно
>>> обнаружил, что в стандартных библиотеках
>>> libm, librt, предоставляемых пакетами glibc-core и
>>> glibc-pthread, соответственно,
>>> отсутствуют важные функции fmod, clock_getres.
>>> Однако их прототипы в .h файлах
>>> имеются.
>>>
>>> Это так и задумано, или тут есть какая-то
>>> ошибка?
>>  Мнэээ...
>>>  findsym fmod
>>  /lib/libm.so.6: 000099f0 W fmod
>>  /usr/lib/libm.so: 000099f0 W fmod
>>>  findsym clock_getres
>>  /lib/librt.so.1: 00003a00 T clock_getres
>>  /usr/lib/librt.so: 00003a00 T clock_getres
>
> При линковке ставьте -lm и -lrt в конец команды, и важные функции, скорее
> всего, найдутся.
>
> --
> ldv
>
> _______________________________________________
> Devel mailing list
> Devel@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/devel


  reply	other threads:[~2010-12-01 15:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-01  6:00 Bergman Andrey
2010-12-01  7:10 ` REAL
2010-12-01 13:23   ` Dmitry V. Levin
2010-12-01 15:01     ` Bergman Andrey [this message]
2010-12-01 15:17       ` Kirill A. Shutemov
2010-12-01 15:20         ` Mikhail Efremov
2010-12-01 15:35       ` Ivan Fedorov
2010-12-01 16:11         ` Bergman Andrey
2010-12-04 15:44         ` [devel] [[as-needed]] " Michael Shigorin
2010-12-04 18:49           ` [devel] wiki Ivan Fedorov
2010-12-05  6:53             ` Chernyshov A
2010-12-05 12:52             ` Michael Shigorin

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=706911291215709@web108.yandex.ru \
    --to=vkni@yandex.ru \
    --cc=devel@lists.altlinux.org \
    /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 Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git