Use of undeclared identifier 'GL_DEPTH_STENCIL'

Hi, I’m trying to build the cocos2d_libs project for iOS with Cocos v4

Since the various official guides produce errors, I am trying another method.

That is, I took the Cocos project from 3.17 and updated it with all the files of the new cocos.

I have an error with this file: UtilsGL.cpp, precisely:

#ifdef CC_USE_GLES
internalFormat = GL_DEPTH_STENCIL_OES;
type = GL_UNSIGNED_INT_24_8_OES;
internalFormat = GL_DEPTH24_STENCIL8;
type = GL_UNSIGNED_INT_24_8;

Being Metal it goes into the else statement and the compiler does not find the three define.

I wanted to ask if you can help me understand where these variables are defined?
Maybe I am missing some parameters in the project or some framework?

Thank you

I update because I was able to compile the Cocos 4.0 from the 3.17 XCode project.

I removed the /renderer/backend/opengl folder that was causing the error from the project.
It is probably present in case of compilation with OpenGL, very interesting for comparative tests.
I will learn more later.

Also I added the /external/glsl-optimizer folder

This way Cocos 4.0 compiles with XCode.

Now I have to compile the test-cpp project, I’ll try with Cmake.

I am not an expert in CMake, and certainly by studying it I will be able to understand the points in favor of this system, but if I can leave my feedback it seems unintuitive and more complicated than having an XCode project already working as it was in the past.