2009/1/28 Reini Urban: > The importlib /usr/lib/w32api/libglut32.a has some problems. Linking > to the dll directly works fine. > > $ cat test.c > #include <stdio.h> > #include <stdlib.h> > #include <GL/glut.h> > int main(int argc, char *argv[]) > { > if(glutInit == NULL) { > printf("glutInit is NULL\n"); > return EXIT_FAILURE; > } > printf("GLUT %d\n", GLUT_API_VERSION); > return EXIT_SUCCESS; > } > $ gcc test.c -lglut32 -lglu -lopengl32 > undefined reference to `___glutInitWithExit' > undefined reference to `___glutCreateWindowWithExit' > undefined reference to `___glutCreateMenuWithExit' > $ gcc test.c /bin/glut32.dll -lglu -lopengl32 > > $ ./a > GLUT 3
> I see nothing problematic, but I'm no expert And to answer the libsearch patch question, about being shadowed from another libglut: $ gcc --verbose test_1676.c -lglut32 -lglu32 -lopengl32 2>&1 |grep collect2 $ /usr/lib/gcc/i686-pc-cygwin/3.4.4/collect2.exe --verbose -Bdynamic --dll-search-prefix=cyg /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../crt0.o -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -L/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../.. test.o -lglut32 -lglu32 -lopengl32 -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc 2>&1 |grep succeed attempt to open /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../crt0.o succeeded attempt to open test.o succeeded attempt to open /usr/lib/w32api/libglut32.a succeeded attempt to open /usr/lib/w32api/libglu32.a succeeded attempt to open /usr/lib/w32api/libopengl32.a succeeded attempt to open /usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a succeeded attempt to open /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a succeeded attempt to open /usr/lib/w32api/libuser32.a succeeded attempt to open /usr/lib/w32api/libkernel32.a succeeded attempt to open /usr/lib/w32api/libadvapi32.a succeeded attempt to open /usr/lib/w32api/libshell32.a succeeded attempt to open /usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a succeeded Everything looks okay to me here also -- Reini Urban http://phpwiki.org/ http://murbreak.at/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/