title: undefined reference to `dlopen'
body: <p>I have a program that does not build with modern GCC with the foollowing output:</p>
  
  <pre><code>gcc -I/usr/lib/qt3/include -I/opt/kde3/include/  -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -lqt-mt -ldl -L/usr/lib/qt3/lib64 -o autocheck autocheck.cpp
  autocheck.cpp: In function 'int main(int, char**)':
  autocheck.cpp:64:62: warning: too many arguments for format
  autocheck.cpp:79:79: warning: too many arguments for format
  /tmp/ccOFReGf.o: In function `main':
  autocheck.cpp:(.text+0x244): undefined reference to `dlopen'
  autocheck.cpp:(.text+0x2e1): undefined reference to `dlerror'
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>I searched the Internet for advise but only found a recommendation to add -ldl to the linker. But this does not help here. What should I do?</p>