🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #14232

Re: math.h y log()

#14232
From: Jesús Carrete Montaña
Date: Sun, 26 Nov 2000 00:00
41 lines
1785 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

El 26 Nov 2000 19:23:03 GMT, las fuerzas c�smicas confluyeron
en la mente de DaVinci, quien iluminado, dijo:
> Hola.
>
> Acabo de intentar compilar una prueba en C del estilo:
>
> 	#include <math.h>
>
>	.../...
>	f = log(num);
>
> y obtengo el siguiente error:
>
> 	/tmp/ccfG5dhc.o: In function `main':
> 	/tmp/ccfG5dhc.o(.text+0x25): undefined reference to `log'
>	collect2: ld returned 1 exit status

	Has de meterle -lm a la hora de compilar. Las funciones matem�ticas
no est�n en la parte de la biblioteca est�ndar con la que se enlaza
autom�ticamente.

Un saludo.
- -- 
"I use free software."
- --
    .~.     |/    ,_|-.|
    /V\     |\L|(||||_||<() @ escomposlinux.org
   // \\    Linux Registered User #158442
  /(   )\   Public PGP Key avaliable via e-mail
   ^`~'^    and pgp.rediris.es
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6IWjmfUtQQKOnZ1IRAvflAJ45dR8c+LiOg3oMaa1nR2q/aeMuGQCgre/p
NirVOchOB7yuzcgDKiOLwTM=
=x2BY
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <slrn922q6m.te.kuantiko@relativistic.homeip.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8vrnun$agc$1@kenobi.antakira.com>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,e0de24de9a7406f1,start
X-Google-Attributes: gidf86c8,public
From: kuantiko@escomposlinux.org (Jesús Carrete Montaña)
Subject: Re: math.h y log()
Date: 2000/11/26
Message-ID: <slrn922q6m.te.kuantiko@relativistic.homeip.net>
X-Deja-AN: 697984649
Content-Transfer-Encoding: 8bit
References: <8vrnun$agc$1@kenobi.antakira.com>
Content-Type: text/plain; charset=iso-8859-1
X-Trace: fu-berlin.de 975271164 5902384 62.83.53.27 (16 [54696])
Mime-Version: 1.0
User-Agent: slrn/0.9.6.2 (Linux)
Reply-To: kuantiko@escomposlinux.org
Newsgroups: es.comp.os.linux.programacion