X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:reply-to:subject:message-id:date :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=CBh7SBKsveArJl1rQKqEcc/qlkzVfynRXFjoAKHrqojoq65JC91/k jONp6D5DhnRxCyEFXZQvxeW7hjEhvkEhtmSY+FzwKdFTEcEu/VOpzZ8UvqRJoOaP 5VPaf3/JwEF89BgQZD2alZ5fkdKNbLVzfepxAU8PGjQ/6oUBlPJh6U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:reply-to:subject:message-id:date :mime-version:content-type:content-transfer-encoding; s=default; bh=Q8yU8FScpqXpuur5UCkaxEJ0PWI=; b=XdC1HoWgzu8sR1yexyNocg9DdHXO cyou5SwRN+XWkP7Rfc28qZxUV+XXZJi7s5MkvcsA1ppwVzq6pwdl0q92gycPO8P7 fKiEDQAyVdkIfioSBiz2iJsUbroSPTCL5eaccyM2iChp2+UU6flxWi63klSYOH2X VgDscXSkw+nBju8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,FREEMAIL_REPLYTO,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=NEVER, w32api-runtime, w32apiruntime, HX-HELO:sk:mail-pf X-HELO: mail-pf1-f179.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:reply-to:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=EZ8j3zlBCtV7NsiuY/A419ubeMBEGlplx1e7wqHK7sQ=; b=hIEiB7del+VbUQ0DkMMnh0iDdXom7a358CGRSZA+CtllNdRKi9tk11vs3QpNhTTfrg kB9+avGfNVN5Pbf9cYhxUFAOaNSp3hLNmS+g6Nud6uRohJLb9rdtF7mRfuMpmIdtxrhe x/UMSCdDO3dpH4zGBNhCl8gbbA/korVB9sJlFmwixRroRkIMH/E78EsEET6dUAZWmpt9 4IdPQGXUjepcgEjhMxUAp+oMMVNnxg/rESJ705Q0CiRvoFiQALyZtGQ175O55oG7yd9m 5/eiI7ohxE/CBs55cfwpvLccI/HQAgp1WvNTIlHnNMqyxDE0HirZaeheOk7m80R/HvTg JdVQ== From: "Matt D." To: cygwin AT cygwin DOT com Reply-To: codespunk+cygwin AT gmail DOT com Subject: What is the purpose of libglut32? Message-ID: Date: Thu, 27 Sep 2018 08:48:01 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Does anyone know what libglut32 is used for? It comes as part of "w32api-runtime" and "mingw64-i686-runtime" and is installed into: usr/lib/w32api/libglut32.a and usr/i686-w64-mingw32/sys-root/mingw/lib/libglut32.a I haven't been able to find a use for this as attempting to link with it produces the following errors: undefined reference to `_imp____glutInitWithExit AT 12' undefined reference to `_imp____glutCreateWindowWithExit AT 8' undefined reference to `_imp____glutCreateMenuWithExit AT 8' It is possible to link with it if -DGLUT_DISABLE_ATEXIT_HACK is used to skip these declarations but then it depends upon glut32.dll which isn't provided by any package. How can libglut32 be used for anything if it is missing its binary dependency? Is this library unused? Is the glut32.dll dependency an error? Also note that this define really isn't meant to be used since it disables a necessary workaround as defined in freeglut_std.h. See here: > Win32 has an annoying issue where there are multiple C run-time > libraries (CRTs). If the executable is linked with a different CRT > from the GLUT DLL, the GLUT DLL will not share the same CRT static > data seen by the executable. In particular, atexit callbacks > registered in the executable will not be called if GLUT calls its > (different) exit routine. GLUT is typically built with the > "/MD" option (the CRT with multithreading DLL support), but the Visual > C++ linker default is "/ML" (the single threaded CRT). > > One workaround to this issue is requiring users to always link with > the same CRT as GLUT is compiled with. That requires users supply a > non-standard option. GLUT 3.7 has its own built-in workaround where > the executable's "exit" function pointer is covertly passed to GLUT. > GLUT then calls the executable's exit function pointer to ensure that > any "atexit" calls registered by the application are called if GLUT > needs to exit. > > Note that the __glut*WithExit routines should NEVER be called > directly. To avoid the atexit workaround, #define > GLUT_DISABLE_ATEXIT_HACK. This library is NOT the same as libgut, which seems to be the appropriate way to include glut, even when compiling for MinGW. Matt D. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple