www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=0.5 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_28,J_CHICKENPOX_43,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <6910a60901281451m443ccba3ke566332355f3c81c@mail.gmail.com> |
References: | <6910a60901281451m443ccba3ke566332355f3c81c AT mail DOT gmail DOT com> |
Date: | Thu, 29 Jan 2009 00:08:22 +0100 |
Message-ID: | <6910a60901281508u6593920eu3ee1dd5c826c67e8@mail.gmail.com> |
Subject: | Re: opengl-1.1.0-10 glut32 linking problems |
From: | Reini Urban <rurban AT x-ray DOT at> |
To: | The Cygwin Mailing List <cygwin AT cygwin DOT com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |