← Back to team overview

kicad-developers team mailing list archive

Re: Glew linking errors

 

I solved it! After a bit of research, it became clear that the "_imp" preceding all the function names meant that the dll import library was being linked. I changed

GLEW_GLEW_LIBRARY =glew-1.10.0/lib/libglew32.a

to

GLEW_GLEW_LIBRARY =glew-1.10.0/lib/libglew32.dll.a

and the build completed successfully.

David


On 3/10/2014 3:03 PM, jp charras wrote:
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.





--

David Novak

Dajac Inc.
317-608-0500 ext. 112

www.Dajac.com
David.Novak@xxxxxxxxx

This electronic message contains information which may be legally confidential and/or privileged. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.



References