Hi,

I've still some problems to link various libraries (here: against
FreeGLUT). I tried it in native windows with mingw and currently with
my cross compiler in Gentoo (xmingw). All applications that use
FreeGLUT need to link also against -lwinmm and -lgdi32. I tried to avoid
this by linking FreeGLUT explicit against both. But for some reason
this doesn't work. 

See the final FreeGLUT linker command that shows it links against the
needed libraries (libwinmm, libgdi32):

/bin/sh ../libtool --mode=link i386-mingw32msvc-gcc  -Wall -pedantic
-Werror  -L/opt/xmingw/i386-mingw32msvc/lib -o libglut.la
-rpath /opt/xmingw/i386-mingw32msvc/lib -version-info 11:0:8
...
libglut_la-freeglut_videoresize.lo libglut_la-freeglut_window.lo -lm
-lopengl32 -lglu32 -lwinmm -lgdi32 rm
-fr .libs/libglut.la .libs/libglut.* .libs/libglut.*

Here is my la-file for FreeGLUT:

(temporary called libglut.a; better would be libfreeglut.a)

...
# The name of the static archive.
old_library='libglut.a'

# Libraries that this one depends upon.
dependency_libs=' -L/opt/xmingw/i386-mingw32msvc/lib -lm -lopengl32
-lglu32 -lwinmm -lgdi32'
...

But if I link a test application (configure) it fails:

configure:16511: i386-mingw32msvc-gcc -o conftest.exe -g -O2
-I/opt/xmingw/i386-mingw32msvc/include -L/opt/
xmingw/i386-mingw32msvc/lib conftest.c -lglut -lglu32 -lopengl32  -lm
>&5 
>/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_main.o)(.text+0x40e):freeglut_main.c:
>undefin ed reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_main.o)(.text+0x41e):freeglut_main.c:
undefin ed reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_init.o)(.text+0x18a):freeglut_init.c:
undefin ed reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_init.o)(.text+0x1a5):freeglut_init.c:
undefin ed reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_init.o)(.text+0x1d0):freeglut_init.c:
undefin ed reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_init.o)(.text+0x3d2):freeglut_init.c:
undefin ed reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_window.o)(.text+0x11f):freeglut_window.c:
und efined reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_window.o)(.text+0x140):freeglut_window.c:
und efined reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_window.o)(.text+0x180):freeglut_window.c:
und efined reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_joystick.o)(.text+0x76):freeglut_joystick.c:
undefined reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_joystick.o)(.text+0x87d):freeglut_joystick.c:
 undefined reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_display.o)(.text+0xac):freeglut_display.c:
un defined reference to [EMAIL PROTECTED]'
/opt/xmingw/i386-mingw32msvc/lib/libglut.a(libglut_la-freeglut_state.o)(.text+0x795):freeglut_state.c:
undef ined reference to [EMAIL PROTECTED]'
collect2: ld returned 1 exit status

This are exact the functiosn from the missing libwinmm and libgdi32 
functions.

I've the same problem with libpng and the dependant libz. I had never
such problems with linking in a Linux system. So where is the problem?

regards
Andreas


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to