Need some help compiling

Post Reply
SocaDLV
Posts: 1
Joined: Wed Apr 03, 2024 11:18 pm

Need some help compiling

Post by SocaDLV » Thu Apr 04, 2024 12:32 am

Hello everyone. I'm having some trouble compiling a modification I'm making for the "textured_cube" example.

Code: Select all

$ make
devkitlenny.png
Minarifer.cpp
In file included from /opt/devkitpro/portlibs/switch/include/EGL/egl.h:39,
                 from /home/usuario/Escritorio/AEV/AEV/Minarifer/source/Minarifer.cpp:14:
/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/EGL/eglplatform.h:149:2: error: #error "Platform not recognized"
  149 | #error "Platform not recognized"
      |  ^~~~~
In file included from /home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/egl_init.h:18,
                 from /home/usuario/Escritorio/AEV/AEV/Minarifer/source/Minarifer.cpp:31:
/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/glad/glad_egl.h:29: warning: "__egl_h_" redefined
   29 | #define __egl_h_
      | 
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:2: note: this is the location of the previous definition
    2 | #define __egl_h_ 1
      | 
/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/glad/glad_egl.h:126: warning: "EGL_DONT_CARE" redefined
  126 | #define EGL_DONT_CARE EGL_CAST(EGLint, -1)
      | 
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:85: note: this is the location of the previous definition
   85 | #define EGL_DONT_CARE                     EGL_CAST(EGLint,-1)
      | 
/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/glad/glad_egl.h:143: warning: "EGL_NO_CONTEXT" redefined
  143 | #define EGL_NO_CONTEXT EGL_CAST(EGLContext, 0)
      | 
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:102: note: this is the location of the previous definition
  102 | #define EGL_NO_CONTEXT                    EGL_CAST(EGLContext,0)
      | 
/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/glad/glad_egl.h:144: warning: "EGL_NO_DISPLAY" redefined
  144 | #define EGL_NO_DISPLAY EGL_CAST(EGLDisplay, 0)
      | 

...

/opt/devkitpro/portlibs/switch/include/EGL/egl.h:104: note: this is the location of the previous definition
  104 | #define EGL_NO_SURFACE                    EGL_CAST(EGLSurface,0)
      | 
/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/glad/glad_egl.h:207: warning: "EGL_UNKNOWN" redefined
  207 | #define EGL_UNKNOWN EGL_CAST(EGLint, -1)
      | 

...



/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/glad/glad_egl.h:271: warning: "EGL_NO_IMAGE" redefined
  271 | #define EGL_NO_IMAGE EGL_CAST(EGLImage, 0)
      | 
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:332: note: this is the location of the previous definition
  332 | #define EGL_NO_IMAGE                      EGL_CAST(EGLImage,0)
      | 
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:126:94: error: 'EGLNativePixmapType' has not been declared
  126 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYBUFFERSPROC) (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
      |                                                                                              ^~~~~~~~~~~~~~~~~~~
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:129: 100 : error: 'EGLNativePixmapType' has not been declared
  129 | typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
      |                                                                                                    ^~~~~~~~~~~~~~~~~~~
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:130: 100 : error: 'EGLNativeWindowType' has not been declared
  130 | typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEWINDOWSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
      |                                                                                                    ^~~~~~~~~~~~~~~~~~~
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:137:34: error: typedef 'PFNEGLGETDISPLAYPROC' is initialized (use 'decltype' instead)
  137 | typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDISPLAYPROC) (EGLNativeDisplayType display_id);
      |                                  ^~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:137:57: error: 'EGLNativeDisplayType' was not declared in this scope
  137 | typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDISPLAYPROC) (EGLNativeDisplayType display_id);
      |                                                         ^~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:151:83: error: 'EGLNativePixmapType' has not been declared
  151 | EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
      |                                                                                   ^~~~~~~~~~~~~~~~~~~
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:154:89: error: 'EGLNativePixmapType' has not been declared
  154 | EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
      |                                                                                         ^~~~~~~~~~~~~~~~~~~
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:155:89: error: 'EGLNativeWindowType' has not been declared
  155 | EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
      |                                                                                         ^~~~~~~~~~~~~~~~~~~
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:162:46: error: 'EGLNativeDisplayType' was not declared in this scope
  162 | EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id);
      |                                              ^~~~~~~~~~~~~~~~~~~~
In file included from /home/usuario/Escritorio/AEV/AEV/Minarifer/source/Minarifer.cpp:15:
/opt/devkitpro/portlibs/switch/include/EGL/eglext.h: 1113 :83: error: 'EGLNativeDisplayType' has not been declared
 1113 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id);
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~
/opt/devkitpro/portlibs/switch/include/EGL/eglext.h: 1114 :99: error: 'EGLNativeWindowType' has not been declared
 1114 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
      |                                                                                                   ^~~~~~~~~~~~~~~~~~~
/opt/devkitpro/portlibs/switch/include/EGL/eglext.h: 1115 :99: error: 'EGLNativePixmapType' has not been declared
 1115 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
      |                                                                                                   ^~~~~~~~~~~~~~~~~~~

/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/glad/glad_egl.h:284:16: error: redefinition of 'void* eglGetDisplay'
  284 |     EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id);
      |                ^~~~~~~~~~~~~
/opt/devkitpro/portlibs/switch/include/EGL/egl.h:162:31: note: 'void* eglGetDisplay' previously defined here
  162 | EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id);
      |                               ^~~~~~~~~~~~~
/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/glad/glad_egl.h:284:30: error: 'EGLNativeDisplayType' was not declared in this scope
  284 |     EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id);
      |                              ^~~~~~~~~~~~~~~~~~~~
/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/egl_init.h: In function 'bool initEgl(NWindow*)':
/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/glad/glad_egl.h:221:38: error: 'EGLNativeDisplayType' does not name a type
  221 | #define EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType, 0)
      |                                      ^~~~~~~~~~~~~~~~~~~~
/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/EGL/eglplatform.h:170:44: note: in definition of macro 'EGL_CAST'
  170 | #define EGL_CAST(type, value) (static_cast<type>(value))
      |                                            ^~~~
/home/usuario/Escritorio/AEV/AEV/Minarifer/source/include/egl_init.h:42:31: note: in expansion of macro 'EGL_DEFAULT_DISPLAY'
   42 |     s_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);

...
     
make[1]: *** [/opt/devkitpro/devkitA64/base_rules:16: Minarifer.o] Error 1
make: *** [Makefile:170: build] Error 2
How could I fix this? I don't know if it's a problem regarding the Makefile or with egl.h itself coming from my devkitpro installation...
Thank you in advance.

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Need some help compiling

Post by WinterMute » Wed Apr 10, 2024 11:34 am

The problem comes from adding EGL headers to your project which are interfering with the switch egl package headers.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests