First get familiar with IDE by creating a simple "Hello World":
http://codelite.org/LiteEditor/QuickStart
The Linker and Compiler options can be altered by right clicking on the project icon and select "settings" -> Compiler or Linker pages
About your specific issue:
* "-fPIC" is automatically set by CodeLite when creating a shared object - you don't need to add it by yourself, just ensure that you are creating a "Dynamic Library" project (in the above link, select the correct template)
"-ldl" is a library (libdl.so), you need to add it to the library list from: "project settings->linker->libraries" and set there: "dl" (without the "-l")
Eran