Article View: es.comp.os.linux.programacion
Article #10764Re: Problema con math.h
From: Fernando Arbeiza
Date: Sun, 03 Feb 2002 00:40
Date: Sun, 03 Feb 2002 00:40
19 lines
1511 bytes
1511 bytes
On Sun, 27 Jan 2002 14:49:40 GMT, Merclaw <josevalla@terra.es> wrote: > me he encontrado con que me da el siguiente error (compilandolo con gcc > programa.c -o programa): > > /tmp/ccZhjehL.o: In function `main': > /tmp/ccZhjehL.o(.text+0x31): undefined reference to `pow' > collect2: ld returned 1 exit status A ver, estoy un poco oxidado de C, pero me parece que lo que te falta es enlazar la librer�a matem�tica. Te refieres a ella en el c�digo fuente, pero luego no lo enlazas. Prueba a compilar el programa as�: gcc -o programa -lm programa.c -- Fernando Arbeiza Cantabria, Spain
Technical Details
Message-ID:
<slrna5p1is.7i5.arbeizaf@jupiter.olimpo>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.rediris.es!newsf01.ono.com!news.ono.com.POSTED!not-for-mailReferences:
<8sU48.95697$MO1.349313@telenews.teleline.es>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,f571f0e1821f5519 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2002-02-02 16:40:14 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.rediris.es!newsf01.ono.com!news.ono.com.POSTED!not-for-mail Newsgroups: es.comp.os.linux.programacion From: Fernando Arbeiza <arbeizaf@ono.com> Subject: Re: Problema con math.h References: <8sU48.95697$MO1.349313@telenews.teleline.es> Message-ID: <slrna5p1is.7i5.arbeizaf@jupiter.olimpo> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit User-Agent: slrn/0.9.7.3 (Linux) Lines: 19 Date: Sun, 03 Feb 2002 00:40:52 GMT NNTP-Posting-Host: 62.42.152.11 X-Trace: news.ono.com 1012696852 62.42.152.11 (Sun, 03 Feb 2002 01:40:52 MET) NNTP-Posting-Date: Sun, 03 Feb 2002 01:40:52 MET