Unfortunately various linker input-related flags used by gcc are quite confusing and it looks like you are using the -L input (library search directories) incorrectly. Please refer to the following page for an overview of the related settings: http://visualgdb.com/support/linkerinputs/