Article View: be.comp.programming
Article #10098Re: gcc probleemke
From: Gunter Schelfhout
Date: Sun, 31 Mar 2002 17:38
Date: Sun, 31 Mar 2002 17:38
30 lines
2085 bytes
2085 bytes
Lazarus Lang wrote: > "Bart Vandewoestyne" <Bart.Vandewoestyne@pandora.be> wrote in message > news:3CA743FA.F9B401AB@pandora.be... > Als ik main.c probeer te compileren krijg ik: >> mc303@forsythe:~/2cw/syst_prog/practicum2$ gcc main.c >> /tmp/cc96dmS6.o: In function `main': >> /tmp/cc96dmS6.o(.text+0x5d): undefined reference to `gcd' >> /tmp/cc96dmS6.o(.text+0x83): undefined reference to `lcm' >> collect2: ld returned 1 exit status >> Het is al een tijdje geleden dat ik nog in C gewerkt heb... wat zie ik >> hier over het hoofd? >> Ik snap niet waarom mijn main geen weet heeft van die gcd en lcm >> functies... > > Het is je linker die van zijn oren maakt. Je moet algorithm.c ook nog > compileren en meelinken. Hoe dat in zijn werk gaat met gcc, > weet ik niet juist meer. Ik stel voor: man gcc > Veel succes. > > L2 Eerst algorithm.c compileren: gcc -o algorithm.o algorithm.c dan main (linken gebeurt automatisch op de volgende manier) gcc -o main main.c algorithm.o -- Blood, sweat & tears
Technical Details
Message-ID:
<uQHp8.41693$DE4.5418@afrodite.telenet-ops.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!skynet.be!skynet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mailReferences:
<3CA743FA.F9B401AB@pandora.be> <mzHp8.41662$DE4.5593@afrodite.telenet-ops.be>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: fcea4,445f663aa5c7931a X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2002-03-31 09:38:35 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!skynet.be!skynet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mail From: Gunter Schelfhout <nospam@please.com> Subject: Re: gcc probleemke Newsgroups: be.comp.programming References: <3CA743FA.F9B401AB@pandora.be> <mzHp8.41662$DE4.5593@afrodite.telenet-ops.be> Lines: 30 User-Agent: KNode/0.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Message-ID: <uQHp8.41693$DE4.5418@afrodite.telenet-ops.be> Date: Sun, 31 Mar 2002 17:38:34 GMT NNTP-Posting-Host: 213.119.20.242 X-Complaints-To: abuse@telenet.be X-Trace: afrodite.telenet-ops.be 1017596314 213.119.20.242 (Sun, 31 Mar 2002 19:38:34 MET DST) NNTP-Posting-Date: Sun, 31 Mar 2002 19:38:34 MET DST Organization: Telenet Internet