I’ve tried to compile my app using fmod with freepascal under linux (gentoo using 2.6.10-rc2). It compiles fine, but the linker produces the error

./libfmod.so: undefined reference to `__divdi3′

I’ve tried with fmod 3.74 and 3.74.1 and with libfmod.so and libfmod-3.74.so as the name for the lib. But every time the same error.

Hope someone has an idea.


I’ve found this hint on the net:
“How do i solve this ?”
“By figuring which LONG LONG division you have (64 by 32, or some
such). If you can replace it with suitable shift-right (which
is equivalent of division by a power of two), you will get both
code without that extra intentionally unsupported gcc internal
library call, and very likely faster code than any other way to
code it.”

  • You must to post comments

So, I finally solved the problem. I linked a libgcc_s.so into the program and now it works. 😀

  • You must to post comments

I have the same problem.

How exactly can this be solved? ow can I link libgcc to my application? And where is this error coming from?

I’m using libfmod 3.75 with freepascal and lazarus

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.