undefined reference to `__divdi3 lazarus / 8-Other ---------------------------------------------------------------------- vigor · 2008-01-26 23:21 I tried to make something with FMOD, and first I only put in "uses" section fmod. When I tried to compile this I got error: /usr/bin/../lib/libfmod.so: undefined reference to `__divdi3'. What is this? How to solve this? I use UBUNTU710 and Lazarus 0.9.24 ---------------------------------------------------------------------- kecmaster · 2009-11-24 23:32 I have that same problem, my code for test: Code: [Select]program test; uses   fmod; var   _mod: pointer;   c: char; begin   //    INITIALIZE   if not(FSOUND_Init(32000, 64, 0)) then begin     exit;   end;   // LOAD SONG   _mod:= FMUSIC_LoadSong('invtro94.s3m');   FMUSIC_PlaySong(_mod);   writeln('Playing %s...\n'+FMUSIC_GetName(_mod));   c:='s';   while(c<>'a') do begin     read(c);   end;   //FREE SONG AND SHUT DOWN   FMUSIC_FreeSong(_mod);   FSOUND_Close(); end. Compiling return error: /usr/lib/libfmod.so: undefined reference to `__divdi3` ...... SOLUTION: Code: [Select]program teste; //--- INSERT THIS---------- {$linklib stdc++} //--- INSERT THIS---------- uses   fmod; ... Compiling return: Success!! ---------------------------------------------------------------------- Jonas Maebe · 2009-11-25 10:23 Quote from: vigor on January 27, 2008, 12:21:40 amI tried to make something with FMOD, and first I only put in "uses" section fmod. When I tried to compile this I got error: /usr/bin/../lib/libfmod.so: undefined reference to `__divdi3'. What is this? How to solve this? I use UBUNTU710 and Lazarus 0.9.24 I think that linking libstc++ is overkill for that. This symbol is normally located in libgcc, so {$linklib gcc} should be enough.