Skip to content

Conversation

sparr
Copy link
Contributor

@sparr sparr commented May 10, 2023

This PR resolves a number of outstanding warnings when compiling with gcc. More details in the commit messages.

gluTessCallback(tesselator, GLU_TESS_VERTEX_DATA, (_GLUfuncptr) TessVertexCallback);
gluTessCallback(tesselator, GLU_TESS_END_DATA, (_GLUfuncptr) TessEndCallback);
gluTessCallback(tesselator, GLU_TESS_ERROR_DATA, (_GLUfuncptr) ErrorCallback);
gluTessCallback(tesselator, GLU_TESS_COMBINE_DATA, (_GLUfuncptr) TessCombineCallback);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and all the above (_GLUfuncptr) casts break the Windows build.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have access to a Windows machine to test on. I was hoping there would be build actions set up here so that I could get some results from other platforms. Can you share the errors it produces?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. The error is this:

Compiling file src/Core/OOMeshToOctreeConverter.m ... src/Core/OOPolygonSprite.m: In function '-[OOPolygonSprite loadPolygons:outlineWidth:]': src/Core/OOPolygonSprite.m:286:52: error: '_GLUfuncptr' undeclared (first use in this function) src/Core/OOPolygonSprite.m:286:52: note: each undeclared identifier is reported only once for each function it appears in src/Core/OOPolygonSprite.m:286:65: error: expected ')' before 'TessBeginCallback' src/Core/OOPolygonSprite.m:287:66: error: expected ')' before 'TessVertexCallback' src/Core/OOPolygonSprite.m:288:63: error: expected ')' before 'TessEndCallback' src/Core/OOPolygonSprite.m:289:65: error: expected ')' before 'ErrorCallback' src/Core/OOPolygonSprite.m:290:67: error: expected ')' before 'TessCombineCallback' src/Core/OOPolygonSprite.m:354:65: error: expected ')' before 'TessBeginCallback' src/Core/OOPolygonSprite.m:355:66: error: expected ')' before 'TessVertexCallback' src/Core/OOPolygonSprite.m:356:63: error: expected ')' before 'TessEndCallback' src/Core/OOPolygonSprite.m:357:65: error: expected ')' before 'ErrorCallback' src/Core/OOPolygonSprite.m:358:67: error: expected ')' before 'TessCombineCallback' src/Core/OOPolygonSprite.m: At top level: src/Core/OOPolygonSprite.m:657:22: warning: 'TessBeginCallback' defined but not used [-Wunused-function] src/Core/OOPolygonSprite.m:669:22: warning: 'TessVertexCallback' defined but not used [-Wunused-function] src/Core/OOPolygonSprite.m:758:22: warning: 'TessCombineCallback' defined but not used [-Wunused-function] src/Core/OOPolygonSprite.m:765:22: warning: 'TessEndCallback' defined but not used [-Wunused-function] src/Core/OOPolygonSprite.m:777:22: warning: 'ErrorCallback' defined but not used [-Wunused-function] make[3]: *** [obj.win.spk/oolite.obj/OOPolygonSprite.m.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [internal-objc_program-all_] Error 2 make[1]: *** [oolite.all.objc-program.variables] Error 2 make: *** [internal-all] Error 2

_GLUfuncptr is not defined in the Windows headers.

@cheese1
Copy link
Contributor

cheese1 commented Apr 30, 2024

resolves compilation under fedora 40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants