It depends what you do. You can either tell the linker what you want using the "Link libraries" field to the left, or to "Other linker options" to the right.
Using "Link libraries", you have to
remove the
-l. Using the "Other linker options" field, you
must have it:
Note that the image shows both options, you obviously only need one of them (using "Link libraries" is recommended).
EDIT:This assumes you have set up the linker's directories properly, if that is not the case, the linker won't find anything either, of course.