Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.linux.slackware    |    I think its the one without Selinux crap    |    87,272 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 86,678 of 87,272    |
|    Henrik Carlqvist to root    |
|    Re: Long shot question    |
|    07 May 24 05:55:47    |
      From: Henrik.Carlqvist@deadspam.com              On Tue, 07 May 2024 02:58:24 +0000, root wrote:       > magic:magic.o eigen.o fft.o order.o xplot.o best.o minv.o utils.o       > xtfuncs.o mygetline.o mymouse.o       > gcc -o/root/bin/magic -Xlinker -Map=/ram/MAP.map -lm       > -L/usr/lib64/gsl -lgsl -lgslcblas -rdynamic -ldl -lgpm \       > magic.o eigen.o fft.o order.o xplot.o minv.o best.o utils.o       > xtfuncs.o mygetline.o mymouse.o              The above is the linking step where your executable magic is linked by a       number of object files and some standard system libraries.              > The problem is that the math libraries have all be renamed, or something       > else and none of the math functions compile. I get unresolved errors for       > all the math functions log,exp,sin,cos..... as well as anything using       > the Gnu math libraries.              As you say, sin, cos and other functions are expected to be in libm which       you should get linked with the switch -lm.              Are you sure that cos is missing from your standard math library? You       could check with a command like:              nm /usr/lib*/libm.so | grep " cos"              If you find cos in the library, my guess instead is that your command       line has failed. Could it be that the switch "-Map=/ram/MAP.map" somehow       hides the switch "-lm"?              Another problem which I have seen during the years is that some linkers       might be picky about the order of object files and libraries. They       require that object files and libraries come after object files and       libraries which call their functions. In your example you have all your       libraries before your object files, if you have such a linker those       object files will not find their functions in the libraries. If you don't       want to work out which files calls stuff in other files, one quick       workaround for such a situation would be to give all files twice:              gcc -o/root/bin/magic -Xlinker -Map=/ram/MAP.map \        -lm -L/usr/lib64/gsl -lgsl -lgslcblas -rdynamic -ldl -lgpm \        magic.o eigen.o fft.o order.o xplot.o minv.o best.o utils.o \        xtfuncs.o mygetline.o mymouse.o \        -lm -L/usr/lib64/gsl -lgsl -lgslcblas -rdynamic -ldl -lgpm \        magic.o eigen.o fft.o order.o xplot.o minv.o best.o utils.o \        xtfuncs.o mygetline.o mymouse.o              regards Henrik              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca