[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Linking c programs?



Hi,

I've been trying to compile a c program which uses maths functions like pow()
and cbrt(), I've included the #include <math.h> and it compiles to an object
ok. However when I try to compile it to a program I get:

/tmp/ccc13322: In function `difi':
/tmp/ccc13322(.text+0xea): undefined reference to `cbrt'

Am I supposed to use some command line to gcc to make it work, I've been using 

gcc -o it it.c

to make a program called 'it' from the source 'it.c'

Any help would be greatly appreciated, TIA
-- 
Best Wishes,
Andy Holmes <andy@proxima.force9.co.uk>

We are MicroSoft.  You will be assimilated.  Resistance is futile.
        -- Attributed to B.G., Gill Bates


Reply to: