Le 10/03/2014 19:20, David Novak a écrit :
I built Glew using MinGW and the Kicad build is still failing to link
pcbnew, but the error messages are different.
[100%] Building CXX object
pcbnew/CMakeFiles/pcbnew.dir/__/common/base_units.cpp
.obj
Linking CXX executable pcbnew.exe
..\common\libgal.a(opengl_gal.cpp.obj):opengl_gal.cpp:(.text+0x27d6):
undefined
reference to `_imp__glewInit@0'
..\common\libgal.a(opengl_gal.cpp.obj):opengl_gal.cpp:(.text+0x2831):
undefined
reference to `_imp____GLEW_VERSION_2_1'
..\common\libgal.a(opengl_gal.cpp.obj):opengl_gal.cpp:(.text+0x2a0f):
undefined
reference to `_imp____GLEW_EXT_framebuffer_object'
..\common\libgal.a(opengl_gal.cpp.obj):opengl_gal.cpp:(.text+0x2a1d):
undefined
reference to `_imp____GLEW_ARB_vertex_buffer_object'
..\common\libgal.a(opengl_gal.cpp.obj):opengl_gal.cpp:(.text+0x2af4):
undefined
reference to `_imp__glewGetString@4'
..\common\libgal.a(opengl_gal.cpp.obj):opengl_gal.cpp:(.text+0x301f):
undefined
reference to `_imp__glewGetErrorString@4'
Here are the commands I used to build Glew
gcc -DGLEW_NO_GLU -O2 -Wall -W -Iinclude -DGLEW_BUILD -o src/glew.o -c
src/glew.c
gcc -shared -Wl,-soname,libglew32.dll
-Wl,--out-implib,lib/libglew32.dll.a -o lib/glew32.dll src/glew.o
-L/mingw/lib -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
ar cr lib/libglew32.a src/glew.o
In Cmake, I have
GLEW_GLEW_LIBRARY =glew-1.10.0/lib/libglew32.a
Any tips to help me figure out what I'm doing wrong?
David
I do not remember how I built glew, but I am pretty sure I just used the
usual command "make" and nothing else.