title: What does the `cc` option `-ldl` do in the following command?
body: <p>during compilation of dynlinktest.c it gives following error:</p>
  
  <p>unipro@ubuguest:~$ <strong>cc dynamiclinktest.c -o dynamiclinktest
  /tmp/ccli8dp2.o: In function <code>main':
  dynamiclinktest.c:(.text+0x53): undefined reference to</code>dlopen'
  dynamiclinktest.c:(.text+0x83): undefined reference to <code>dlsym'
  dynamiclinktest.c:(.text+0x109): undefined reference to</code>dlclose'
  collect2: ld returned 1 exit status</strong></p>
  
  <p>after using cc dynlinktest.c -o dynlinktest -ldl it runs.
  i didn't get why it is neccessary using <code>-ldl</code> ?</p>
  
  <p>edit1: leaving space before error.</p>