Date: Wed, 4 Oct 2006 18:20:24 -0700 From: MC <rossiya@gmail.com> To: freebsd-ports-bugs@freebsd.org Subject: Nvidia and libglut header files mutually broken Message-ID: <28a99ba50610041820q5a3e817y65d22415378e1c08@mail.gmail.com> In-Reply-To: <28a99ba50610022232w54c72118k72da417a18edc51a@mail.gmail.com> References: <28a99ba50610022232w54c72118k72da417a18edc51a@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello To use GL in builds I changed my CL directory to nvidia's. I seems to be constructed with that intention. But I noticed that libglut programs don't compile, unless glut.h in the nvidia directory /usr/X11R6/share/doc/NVIDIA_GLX-1.0 is prefixed with: #if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ # define GLAPI __declspec(dllexport) # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ # define GLAPI __declspec(dllimport) # else /* for use with static link lib build of Win32 edition only */ # define GLAPI extern # endif /* _STATIC_MESA support */ # define GLAPIENTRY __stdcall #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ # define GLAPI extern # define GLAPIENTRY __stdcall #elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 # define GLAPI __attribute__((visibility("default"))) # define GLAPIENTRY #endif /* WIN32 && !CYGWIN */ Also when building libglut the glut.h file there in work/ needs that prefix as well. This even applies to the latest libglut 6.4.2 as well. Here are trees of my GL header files linked so as to invoke the nvidia headers. Basically I just replaced standard filepaths with nvidia equivalents. I renamed the standard GL directory to _GL, and made GL a symlink to /usr/X11R6/share/doc/NVIDIA_GLX- 1.0/GL: Obviously in retrospect the GL/ in NVIDIA can be bypassed. Anyway it works I'm just including it for completion: pocket:/usr/ports/graphics/libglut # tree -f /usr/X11R6/include/GL/ /usr/X11R6/include/GL |-- /usr/X11R6/include/GL/gl.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/gl.h |-- /usr/X11R6/include/GL/glext.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glext.h |-- /usr/X11R6/include/GL/glu.h -> /usr/X11R6/include/_GL/glu.h |-- /usr/X11R6/include/GL/glut.h -> /usr/X11R6/include/_GL/glut.h |-- /usr/X11R6/include/GL/glut.h,v |-- /usr/X11R6/include/GL/glx.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glx.h `-- /usr/X11R6/include/GL/glxtokens.h -> /usr/X11R6/share/doc/NVIDIA_GLX- 1.0/glxtokens.h pocket:/usr/ports/graphics/libglut # tree -f /usr/X11R6/share/doc/NVIDIA_GLX-1.0 | grep -v html /usr/X11R6/share/doc/NVIDIA_GLX-1.0 |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL | |-- /usr/X11R6/share/doc/NVIDIA_GLX- 1.0/GL/gl.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/gl.h | |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glext.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glext.h | |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glu.h -> /usr/X11R6/include/_GL/glu.h | |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glut.h -> /usr/X11R6/include/_GL/glut.h | |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glut.h,v | |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glx.h -> /usr/X11R6/share/doc/NVIDIA_GLX- 1.0/glx.h | `-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glxtokens.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glxtokens.h |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/README |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/XF86Config.sample |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/gl.h |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glext.h |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glx.h |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glxtokens.h |-- /usr/X11R6/share/doc/NVIDIA_GLX- 1.0/license.txt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?28a99ba50610041820q5a3e817y65d22415378e1c08>