🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: funciones matemáticas

#12998
From: Tomas Sanchez Santos
Date: Fri, 20 Apr 2001 18:34
32 lines
2179 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

En es.comp.os.linux.programacion, Jose Callealta escribi�:

>Estoy comenzando a programar en C bajo linux. Ver�is: el caso es que al usar
>la funciones matem�ticas, como pow, sqrt, sin, etc... y tras incluir
>#include <math.h>, el gcc devuelve un error diciendo que no se han declarado
>dichas funciones. He probado a recompilarlo con diversas opciones, pero
>sigue fallando.
>Por si os sirve de orientaci�n suelo compilar las fuentes de la siguiente
>manera:
>gcc -ansi -Wall program.c -o program

	Tienes que indicar a gcc que enlace tu programa con la libreria
	matematica. Para ello, a�ade la opcion -lm 

Saludos
- -- 
/----------------------------------------------------------------------\
|  Tomas Sanchez Santos	  tsanchez  at  escomposlinux . org            |
|  Clave publica: http://perso.wanadoo.es/tomas-sanchez/tomas-gpg.asc  |
\----------------------------------------------------------------------/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE64IEw4IhFOpHaScYRAp93AKDH90c+isH+6PHXhlE4coG6T0pT+QCfSbO7
xhHFdPWk3NwLfVbgOJ4pm7s=
=kVfu
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <slrn9e1094.1ph.tsanchez@mortadelo.casa>
Path: arc1-ca.pugleaf.net!supernews.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!62-36-134-178.dialup.uni2.ES!not-for-mail
References: <3ae0791a@news>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,a670a5f519cceb58
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-04-20 11:41:45 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!62-36-134-178.dialup.uni2.ES!not-for-mail
From: tsanchez@escomposlinux.org (Tomas Sanchez Santos)
Newsgroups: es.comp.os.linux.programacion
Subject: Re: funciones matemáticas
Date: Fri, 20 Apr 2001 20:34:24 +0200
Lines: 32
Message-ID: <slrn9e1094.1ph.tsanchez@mortadelo.casa>
References: <3ae0791a@news>
Reply-To: tsanchez@escomposlinux.org
NNTP-Posting-Host: 62-36-134-178.dialup.uni2.es (62.36.134.178)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 987792103 11160227 62.36.134.178 (16 [43504])
X-Orig-Path: tsanchez
User-Agent: slrn/0.9.6.2 (Linux)