There is one more step.
In TheIDE, right click on your package, then select the "package organizer".
IT will open the package organizer.
You need to add the library as a "library" (right click -> "new libraries"); (E.g. to use dbus, you need to add "dbus-1" as a library, in the package organizer)
This tells the linker which library to use.