hi, I once had the same problem with sin() and could solve it by placing the "-lm" part at the end of the LD command, like this :
$(LD) -r -static -L/usr/lib -o app.o $(CRTBEGIN) rtmodule.ortmatrix.o $(CRTEND) -lm -lc The man page explains why : <under the -larchive option...> The linker will search an archive only once, at the location where it is specified on the command line. If the archive defines a symbol which was undefined in some object which appeared before the archive on the command line, the linker will include the appropriate file(s) from the archive. However, an undefined symbol in an object appearing later on the command line will not cause the linker to search the archive again. so i guess that will solve it, Peter On Thursday 13 December 2001 13:22, you wrote: > Hello all, > I'm trying to use the sqrt function in my C++ realtime module, but I get > the "unresolved symbol sqrt". I make the linkage as I saw in old postings: > > $(LD) -r -static -L/usr/lib -lm -lc -o app.o $(CRTBEGIN) rtmodule.or > tmatrix.o $(CRTEND) > > I use extern "C" for includes too. > I guess this has to do with the specific problems of C++ realtime code, > the same that prevented me from using POSIX I/O. So probably the easiest > solution will be to use my own sqrt. Does anybody know any implementation > that I could use or easily port?. Thank you. > Regards, > Ivan Martinez > -- [rtl] --- > To unsubscribe: > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] -- For more information on Real-Time Linux see: http://www.rtlinux.org/
