Paul Deppe writes:
>
>When making the latest CVS FGFS on Cygwin/Win2k, the following
>link error occurs:

>/usr/lib/libplibul.a(ulContext.o)(.text+0x47):ulContext.cxx: undefined
>reference
> to `wglGetCurrentContext@0'
>collect2: ld returned 1 exit status
>
>It looks like the link order is wrong - the PLIB libraries should be linked
>before the OpenGL libraries.  But a check of src/Main/Makefile shows:
>
>fgfs: $(fgfs_OBJECTS) $(fgfs_DEPENDENCIES)
>       @rm -f fgfs
>       $(CXXLINK) $(fgfs_LDFLAGS) $(fgfs_OBJECTS) $(fgfs_LDADD) $(LIBS)
>
>and from src/Main/Makefile.am:
>
>fgfs_LDADD = \
>       $(top_builddir)/src/Aircraft/libAircraft.a \
>... lots more libraries...
>       $(THREAD_LIBS) \
>       -lplibpu -lplibfnt -lplibnet -lplibssg -lplibsg \
>       -lmk4 -lz \
>       $(opengl_LIBS) \
>       $(audio_LIBS)
>
>..which looks correct and hasn't changed in a few days.  Yes, this was a
>clean rebuild from autogen.sh on up.  The dates on the src/Main/Makefile*
>files are correct.  automake: 1.4-p5 (14).  This was working yesterday.
Any
>ideas?

PLib has been reorganized to better support MacOSX and the check for
a valid OpenGL context was moved from libplibssg into libplibul

The link problem stems from automake including libraries automatically
included by the AC_CHECK_LIB macro at the end of the linked libs

It appears as if the easiest way to fix this is to change the line in the
Main / Makefile.am file that includes the other PLib libraries to also
include -lplbul

Note that this is probably only a Cygwin problem and will not appear on
Unix because of the difference in the way linking is done.
On Cygwin all symbols must be defined at link time.  ie
ld --no-undef   behaviour in Linux

ld allows including a library more then once in the link library list
so this should not be a problem

Cheers

Norman

======= cut ======
src / Main / Makefile.am
86c86
<         -lplibpu -lplibfnt -lplibnet -lplibssg -lplibsg \
---
>         -lplibpu -lplibfnt -lplibnet -lplibssg -lplibsg -lplibul \


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to