SDL1/2: Compiler error with png/Image #1529
Comments
Seems to be the new addition for saving screenshots has introduced this error (but that's just guesswork). ScummVM builds fine |
I just did a triple check by trying to build the program with using SDL1, SDL2 and OpenGLES2. SDL1 and 2 break, OpenGLES2 does not, so it´s a sole problem of the SDL part |
Whoever is in charge of this part of the AmigaOS SDK needs to be notified it's not a good idea to name their things |
quote: |
What i find really strange is, that it works with ScummVM. |
Since i probably have a fix for this (in SDL tree of AmigaOS) i tried to build residualvm with PNG enabled and encountered a different (but similar) problem.
|
This was fixed in #1546 , I believe? Please reopen if not. |
In file included from ./image/png.h:36,
from backends/graphics/openglsdl/openglsdl-graphics.cpp:40:
./image/image_decoder.h:37:11: error: 'namespace Image { }' redeclared as different kind of symbol
namespace Image {
^~~~~
In file included from /SDK/local/common/include/mgl/context.h:27,
from /SDK/local/common/include/mgl/gl.h:74,
from /SDK/local/common/include/GL/gl.h:1925,
from /SDK/local/newlib/include/SDL2/SDL_opengl.h:43,
from ./graphics/opengl/system_headers.h:52,
from ./graphics/opengl/framebuffer.h:26,
from backends/graphics/openglsdl/openglsdl-graphics.cpp:35:
/SDK/include/include_h/intuition/intuition.h:754:8: note: previous declaration 'struct Image'
struct Image
^~~~~
In file included from backends/graphics/openglsdl/openglsdl-graphics.cpp:40:
./image/png.h:47:11: error: 'namespace Image { }' redeclared as different kind of symbol
namespace Image {
^~~~~
In file included from /SDK/local/common/include/mgl/context.h:27,
from /SDK/local/common/include/mgl/gl.h:74,
from /SDK/local/common/include/GL/gl.h:1925,
from /SDK/local/newlib/include/SDL2/SDL_opengl.h:43,
from ./graphics/opengl/system_headers.h:52,
from ./graphics/opengl/framebuffer.h:26,
from backends/graphics/openglsdl/openglsdl-graphics.cpp:35:
/SDK/include/include_h/intuition/intuition.h:754:8: note: previous declaration 'struct Image'
struct Image
^~~~~
backends/graphics/openglsdl/openglsdl-graphics.cpp: In member function 'virtual bool OpenGLSdlGraphicsManager::saveScreenshot(const Common::String&) const':
backends/graphics/openglsdl/openglsdl-graphics.cpp:685:16: error: 'writePNG' is not a member of 'Image'
return Image::writePNG(out, data, true);
^~~~~~~~
gmake: *** [backends/graphics/openglsdl/openglsdl-graphics.o] Error 1
I got this after switching from gcc 8.1.0 to 8.3.0
I haven't tried the ScummVM chain yet (need to check if there is the same(similar error)
gcc (adtools build 8.3.0) 8.3.0
AmigaOS4 - PPC - SDL2 - BE
The text was updated successfully, but these errors were encountered: