ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] Не собираются программы с мат. функциями
@ 2007-09-24  6:42 unnamedartist
  2007-09-24  6:51 ` Хихин Руслан
  0 siblings, 1 reply; 2+ messages in thread
From: unnamedartist @ 2007-09-24  6:42 UTC (permalink / raw)
  To: community

Здравствуйте,
Недавно поставил себе ALT Linux Desktop 4.0, попробовал скомпилировать простейшую программу использующую math.h:

#include <math.h>
#include <stdio.h>

int main (int argc, char **argv)
{
 double f1;
 f1=36;
 printf("%f", sqrt(f1));
 return 0;
}

Makefile:
CFLAGS     = -g -Wall
LDFLAGS    = -lm
CXXFLAGS   = $(CFLAGS)
СOMMON     = try.c
PROGRAM    = try
all:	$(COMMON) $(PROGRAM)

При компоновке выдается сообщение:
/try/try.c:8: undefined reference to `sqrt'

Еще обнаружил, что /usr/lib/ldscripts.elf_i386.x в SEARCH_DIR стоит ("/usr/i586-alt-linux/lib"), хотя такой каталог на самом деле отсутствует. Это баг или я не поставил какой-то пакет? 

B поправил символическую ссылку /usr/lib/libm.so на файл /lib/libm.so.6

В чем может быть проблема?



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Comm] Не собираются программы с мат. функциями
  2007-09-24  6:42 [Comm] Не собираются программы с мат. функциями unnamedartist
@ 2007-09-24  6:51 ` Хихин Руслан
  0 siblings, 0 replies; 2+ messages in thread
From: Хихин Руслан @ 2007-09-24  6:51 UTC (permalink / raw)
  To: community

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

Здравствуйте unnamedartist@mail.ru
  В сообщении от Понедельник 24 сентября 2007 unnamedartist@mail.ru 
написал(a):
 > LDFLAGS    = -lm
LDLIBS - -lm
не пробовали ?

-as-need

-- 
  А ещё говорят так  (fortune):
 
- Что делает системный администратор, проснувшись с похмелья? - 
Тестирует память...  

________________________________________________________________________
С уважением Хихин Руслан

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-24  6:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-24  6:42 [Comm] Не собираются программы с мат. функциями unnamedartist
2007-09-24  6:51 ` Хихин Руслан

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