You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an error when trying to compile the code as described on Ubuntu 18.04.
It appears to be an issue with linking the math libraries.
gcc -m32 -Wint-to-pointer-cast -lm -pthread build/build-i386/bmpread.o build/build-i386/cmdlib.o build/build-i386/mathlib.o build/build-i386/scriplib.o build/build-i386/studiomdl.o build/build-i386/trilib.o build/build-i386/tristrip.o build/build-i386/write.o -o build/bin-i386/studiomdl
build/build-i386/cmdlib.o: In function `Q_getwd':
cmdlib.c:(.text+0x488): warning: the `getwd' function is dangerous and should not be used.
build/build-i386/mathlib.o: In function `VectorLength':
mathlib.c:(.text+0x61): undefined reference to `sqrt'
build/build-i386/mathlib.o: In function `Q_rint':
mathlib.c:(.text+0x101): undefined reference to `floor'
build/build-i386/mathlib.o: In function `VectorNormalize':
mathlib.c:(.text+0x408): undefined reference to `sqrt'
build/build-i386/mathlib.o: In function `AngleMatrix':
mathlib.c:(.text+0x5cf): undefined reference to `sin'
mathlib.c:(.text+0x5e7): undefined reference to `cos'
mathlib.c:(.text+0x612): undefined reference to `sin'
mathlib.c:(.text+0x62a): undefined reference to `cos'
mathlib.c:(.text+0x652): undefined reference to `sin'
mathlib.c:(.text+0x66a): undefined reference to `cos'
build/build-i386/mathlib.o: In function `AngleIMatrix':
mathlib.c:(.text+0x775): undefined reference to `sin'
mathlib.c:(.text+0x78d): undefined reference to `cos'
mathlib.c:(.text+0x7b8): undefined reference to `sin'
mathlib.c:(.text+0x7d0): undefined reference to `cos'
mathlib.c:(.text+0x7f8): undefined reference to `sin'
mathlib.c:(.text+0x810): undefined reference to `cos'
build/build-i386/mathlib.o: In function `AngleQuaternion':
mathlib.c:(.text+0xebc): undefined reference to `sin'
mathlib.c:(.text+0xed4): undefined reference to `cos'
mathlib.c:(.text+0xeff): undefined reference to `sin'
mathlib.c:(.text+0xf17): undefined reference to `cos'
mathlib.c:(.text+0xf3f): undefined reference to `sin'
mathlib.c:(.text+0xf57): undefined reference to `cos'
build/build-i386/mathlib.o: In function `QuaternionSlerp':
mathlib.c:(.text+0x136e): undefined reference to `acos'
mathlib.c:(.text+0x1386): undefined reference to `sin'
mathlib.c:(.text+0x13a7): undefined reference to `sin'
mathlib.c:(.text+0x13c7): undefined reference to `sin'
mathlib.c:(.text+0x1497): undefined reference to `sin'
mathlib.c:(.text+0x14bf): undefined reference to `sin'
build/build-i386/studiomdl.o: In function `TextureCoordRanges':
studiomdl.c:(.text+0x57eb): undefined reference to `fmin'
studiomdl.c:(.text+0x581b): undefined reference to `fmin'
studiomdl.c:(.text+0x5866): undefined reference to `fmax'
studiomdl.c:(.text+0x5896): undefined reference to `fmax'
studiomdl.c:(.text+0x5a56): undefined reference to `fmin'
studiomdl.c:(.text+0x5a86): undefined reference to `fmin'
studiomdl.c:(.text+0x5ad1): undefined reference to `fmax'
studiomdl.c:(.text+0x5b01): undefined reference to `fmax'
studiomdl.c:(.text+0x5f88): undefined reference to `fmax'
studiomdl.c:(.text+0x5fe0): undefined reference to `fmin'
studiomdl.c:(.text+0x6038): undefined reference to `fmax'
studiomdl.c:(.text+0x6090): undefined reference to `fmin'
build/build-i386/studiomdl.o: In function `ResizeTexture':
studiomdl.c:(.text+0x65d9): undefined reference to `pow'
build/build-i386/studiomdl.o: In function `Grab_Animation':
studiomdl.c:(.text+0x8ce3): undefined reference to `cos'
studiomdl.c:(.text+0x8d03): undefined reference to `sin'
build/build-i386/studiomdl.o: In function `.L944':
studiomdl.c:(.text+0xc0c3): undefined reference to `cos'
collect2: error: ld returned 1 exit status
Makefile:97: recipe for target 'build/bin-i386/studiomdl' failed
make: *** [build/bin-i386/studiomdl] Error 1
I was able to get it compiling by moving to -ld flag in the compile line to come after the objects (as per this Stack Overflow issue answer.
The text was updated successfully, but these errors were encountered:
I get an error when trying to compile the code as described on Ubuntu 18.04.
It appears to be an issue with linking the math libraries.
I was able to get it compiling by moving to
-ld
flag in the compile line to come after the objects (as per this Stack Overflow issue answer.The text was updated successfully, but these errors were encountered: