Reputation: 21
I already installed libglew and the dev but still cannot find -glew when compiling
/usr/bin/ld: cannot find -lglew
collect2: error: ld returned 1 exit status
also I've written in code like
#include<GL/glew.h>
#pragma comment(lib, "glew32.lib")
what should I do next?
Upvotes: 2
Views: 9618
Reputation: 14781
As far as I know the package glew
brings libraries named libGLEW.a
and libGLEW.so
, so instead of -lglew
you shall try -lGLEW
.
Also #pragma comment(lib, "glew32.lib")
is the way that Microsoft VS compilers do with libraries, and is expected to have no effect with GNU/Linux
toolchains like gcc
or clang
.
Upvotes: 6
Reputation: 2832
If not pathed then just add the full path to the filename of the lib. first make sure that the lib really exists.
Upvotes: 0