[英]Link glew.lib as a static library with eclipse
I am a newbie in C++, I made many searches before I ask, I started OpenGL tutorial with C++ , I am using eclipse with GNU cross compiler, I know how to like static libraries with libXXX.a
format then I want to use GLEW
library, I have its source code and a precompiled version for windows which is libglew32.lib
, if I use make
to compile the source code I get an error which is 我是C ++的新手,在问一下之前,我进行了很多搜索,我开始使用C ++进行OpenGL教程,我在GNU交叉编译器中使用eclipse,我知道如何喜欢
libXXX.a
格式的静态库,然后我想使用GLEW
库,我有其源代码和Windows的预编译版本libglew32.lib
,如果使用make
来编译源代码,则会收到错误消息
make (e=2): The system cannot find the file specified. Makefile:131: recipe for target 'tmp/cygwin/default/shared/glew.o' failed make: *** [tmp/cygwin/default/shared/glew.o] Error 2
make (e=2): The system cannot find the file specified. Makefile:131: recipe for target 'tmp/cygwin/default/shared/glew.o' failed make: *** [tmp/cygwin/default/shared/glew.o] Error 2
. make (e=2): The system cannot find the file specified. Makefile:131: recipe for target 'tmp/cygwin/default/shared/glew.o' failed make: *** [tmp/cygwin/default/shared/glew.o] Error 2
。
if I put the library in the libraries folder and add it to the linker as I do with other libraries I get errors in compiling the project like undefined reference to 'glewExperimental'
or Invalid arguments 'Candidates are:void glfwMakeContextCurrent(*)'
如果我将库放在库文件夹中,然后像其他库一样将其添加到链接器中,则会在编译项目时出现错误,例如
undefined reference to 'glewExperimental'
或Invalid arguments 'Candidates are:void glfwMakeContextCurrent(*)'
so I have 2 questions: 所以我有两个问题:
.lib
files to use with eclipse? .lib
文件以与Eclipse一起使用吗? if yes, how can I do? 我用gcc
编译了它,然后用ar
排列,最后得到了libglew.a
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.