..:: PCSX2 Forums ::..

Full Version: build error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
on my gentoo machine using nvidia drivers + cg compiler, i get the following error trying to build 1.2.2
......
Linking CXX executable pcsx2
[ 53%] Built target pcsx2
[ 54%] Built target CDVDiso
[ 56%] Built target CDVDlinuz
[ 56%] Built target CDVDnull
[ 56%] Built target dev9null-0.5.0
[ 56%] Built target FWnull-0.7.0
[ 57%] Building CXX object plugins/GSdx/CMakeFiles/GSdx-0.1.16.dir/GLLoader.cpp.o
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
/home/mkj/dev/pcsx2-1.2.2-svn/plugins/GSdx/GLLoader.cpp:1:0: note: this is the location of the previous definition
/*
^
In file included from /home/mkj/dev/pcsx2-1.2.2-svn/plugins/GSdx/stdafx.h:199:0,
from /home/mkj/dev/pcsx2-1.2.2-svn/plugins/GSdx/GLLoader.cpp:22:
/home/mkj/dev/pcsx2-1.2.2-svn/plugins/GSdx/GLLoader.h:92:10: error: 'PFNGLBLENDCOLORPROC' does not name a type
extern PFNGLBLENDCOLORPROC gl_BlendColor;
^
/home/mkj/dev/pcsx2-1.2.2-svn/plugins/GSdx/GLLoader.cpp:28:1: error: 'PFNGLBLENDCOLORPROC' does not name a type
PFNGLBLENDCOLORPROC gl_BlendColor = NULL;
^
make[2]: *** [plugins/GSdx/CMakeFiles/GSdx-0.1.16.dir/GLLoader.cpp.o] Error 1
make[1]: *** [plugins/GSdx/CMakeFiles/GSdx-0.1.16.dir/all] Error 2
make: *** [all] Error 2
what is your mesa version? (yes you need mesa include to build any openGL code)
mesa 10.1.0
Could you try this patch?
Code:
Index: plugins/GSdx/GLLoader.h
===================================================================
--- plugins/GSdx/GLLoader.h    (revision 5922)
+++ plugins/GSdx/GLLoader.h    (working copy)
@@ -22,6 +22,16 @@
#pragma once

#ifndef ENABLE_GLES
+// FIX compilation issue with Mesa 10
+// Note it might be possible to do better with the right include
+// in the rigth order but I don't have time
+#ifndef APIENTRY
+#define APIENTRY
+#endif
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+
// Allow compilation with older mesa

#ifndef GL_ARB_copy_image
that did the job :-) it now compiles and works with mesa 10.1.0
Thanks for report & test. Patch commited on SVN Smile