Article View: es.comp.os.linux.programacion
Article #18102Re: Novato intentando aprender C.
From: *puntero_loco
Date: Fri, 01 Oct 1999 00:00
Date: Fri, 01 Oct 1999 00:00
51 lines
2103 bytes
2103 bytes
-----BEGIN PGP SIGNED MESSAGE-----
El 30 Sep 1999 23:35:44 +0200, gustavo nos ray� diciendo:
Tienes que compilar con la opci�n -lm. (gcc archivo.c -lm)
|#include "stdio.h"
|#include "math.h"
|
|main()
|{
| double answer;
|
| answer= sqrt (10.0);
| printf("%f",answer);
|}
|
|
|y da el siguiente error �?�?�
|
|make -k prog
|cc prog.c -o prog
|/tmp/cccPdBGy: In function `main':
|/tmp/cccPdBGy(.text+0xe): undefined reference to `sqrt'
|make: *** [prog] Error 1
|
|Compilation exited abnormally with code 2 at Thu Sep 30 22:52:40
- --
____ _ _
__/\_| _ \ _ _ _ __ | |_ ___ _ __ ___ | | ___ ___ ___
\ / |_) | | | | '_ \| __/ _ \ '__/ _ \ | | / _ \ / __/ _ \
/_ _\ __/| |_| | | | | || __/ | | (_) | | |__| (_) | (_| (_) |
\/ |_| \__,_|_| |_|\__\___|_| \___/___|_____\___/ \___\___/
|_____|
P�gina personal + clave p�blica: http://personal5.iddeo.es/jajs
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1
Comment: Requires PGP version 2.6 or later.
iQCVAwUBN/S+kARI4vufvzrFAQEqSwQAisnfJgdQ6+U8ls4F/gjEsuRd6YhFd4Fm
Rwebq7cJn1NQYIXUbJtoF3/fmX7EQHmS24PawUMatNGnYoeRyNDHuh2u+CPCkNKU
myqnFCSuhMfsa+d35eyprWL+Ikr7KYzrz72Wu9H3Q23E4gw1shz7NzdalSn+LUBk
v7yZdIQD4QM=
=hExX
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<iqe2t7.97.ln@127.0.0.1>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<873dvw3wwf.fsf@antrumis.i-did-not-set--mail-host-address--so-shoot-me>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f86c8,c87a13ed7a252195 X-Google-Attributes: gidf86c8,public From: jajs@QuItAeStOretemail.es (*puntero_loco) Subject: Re: Novato intentando aprender C. Date: 1999/10/01 Message-ID: <iqe2t7.97.ln@127.0.0.1> X-Deja-AN: 531752362 Content-Transfer-Encoding: 8bit References: <873dvw3wwf.fsf@antrumis.i-did-not-set--mail-host-address--so-shoot-me> Content-Type: text/plain; charset=iso-8859-1 Organization: Tarifa plana para todos YA! Mime-Version: 1.0 User-Agent: slrn/0.9.5.3 (UNIX) X-EstadoCivil: Soltero y sin compromiso Newsgroups: es.comp.os.linux.programacion X-Persona: Impresionante