Nevermind I already solved it. I forgot to add the lib dir to search directories tab.
But there is an issue that people may help me to solve. Since I started to use external libraries, I realized through ldd, that my programs are using tons of libraries. Of course, this makes sense for these programs that use OpenGl, QT, glfw, glew, etc.. But I have a pure c/c++ program that does not use anything besides c and c++ functions and it still is using a lot of these external libraries!
Look the output of ldd on it:
linux-vdso.so.1 => (0x00007fff631ff000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007ff8f198e000)
libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0x00007ff8f0cf8000)
libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0x00007ff8f0874000)
libglfw.so => /usr/local/lib/libglfw.so (0x00007ff8f0663000)
libGLEW.so.2.1 => /usr/lib/libGLEW.so.2.1 (0x00007ff8f03be000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007ff8f00a9000)
libm.so.6 => /lib/libm.so.6 (0x00007ff8efe26000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007ff8efc0f000)
libc.so.6 => /lib/libc.so.6 (0x00007ff8ef885000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff8f1bc8000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007ff8ef650000)
libaudio.so.2 => /usr/lib/libaudio.so.2 (0x00007ff8ef437000)
libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00007ff8ef158000)
libpng12.so.0 => /lib/libpng12.so.0 (0x00007ff8eef31000)
libz.so.1 => /lib/libz.so.1 (0x00007ff8eed1a000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007ff8eea93000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007ff8ee84b000)
libSM.so.6 => /usr/lib/libSM.so.6 (0x00007ff8ee642000)
libICE.so.6 => /usr/lib/libICE.so.6 (0x00007ff8ee426000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007ff8ee21c000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007ff8ee00a000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007ff8edcd3000)
libdl.so.2 => /lib/libdl.so.2 (0x00007ff8edacf000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007ff8ed8ca000)
librt.so.1 => /lib/librt.so.1 (0x00007ff8ed6c1000)
libGL.so.1 => /usr/lib/mesa/libGL.so.1 (0x00007ff8ed440000)
libexpat.so.1 => /lib/libexpat.so.1 (0x00007ff8ed216000)
libXt.so.6 => /usr/lib/libXt.so.6 (0x00007ff8ecfb1000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007ff8ecdad000)
libpcre.so.3 => /lib/libpcre.so.3 (0x00007ff8ecb7e000)
libuuid.so.1 => /lib/libuuid.so.1 (0x00007ff8ec979000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007ff8ec75c000)
libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00007ff8ec556000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007ff8ec353000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007ff8ec14c000)
libdrm.so.2 => /lib/libdrm.so.2 (0x00007ff8ebf41000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007ff8ebd3b000
I remeber there was a time it only used 6 libraries or so. It is definitely not using most of these libraries, certainly not QT and Glew stuff that I am only using in the new little programs. What can I do to get rid of them. They may be increasing the program size without any need!