OT: gcc math library

Charles Hallenbeck hallenbeck at valstar.net
Thu Sep 5 08:09:18 EDT 2002


I hope someone may have some quick advice for me on this one.

I have routinely been using the G++ compiler in my programming,
and have recently rewritten some of my code in normal C instead
of C++ for reasons of efficiency and portability. The rewrite was
not difficult, and I finally got one package of about 2000 lines
of code to compile without errors or warnings. However - the
linking step failed when none of the math functions required in
the program could be located by the GCC linker. The same
functions in the C++ version compiled by G++ were found with no
problem. The functions were: sqrt, log, log10, trunc, int,
double, float, etc. The header file math.h was present (without
it, compile errors result) but evidently the C math library could
not be found.

I tried reinstalling my gcc.tgz and glibc.tgz packages to no
avail. I am now heading for the howto's and docs to see what I
can learn. Any help from you programmers out there would be
greatly appreciated.

My system: Slackware 8.0, kernel 2.4.18, GCC 2.95.3

Thanks - Chuck

-- 
The Moon is Waning Crescent (4% of Full)
So visit me at http://www.valstar.net/~hallenbeck





More information about the Speakup mailing list