Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino 1.8.13 and 1.8.9 not compiling #23

Open
BradTotaro opened this issue Mar 8, 2021 · 2 comments
Open

Arduino 1.8.13 and 1.8.9 not compiling #23

BradTotaro opened this issue Mar 8, 2021 · 2 comments

Comments

@BradTotaro
Copy link

Arduino: 1.8.9 (Linux), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

In file included from /home/brad/ESP32CompositeVideo/CompositeVideo/CompositeVideo.ino:9:0:
/tmp/arduino_build_296062/sketch/Matrix.h:28:31: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
const float operator[](int i)
^
/home/brad/ESP32CompositeVideo/CompositeVideo/CompositeVideo.ino: In function 'void draw()':
/home/brad/ESP32CompositeVideo/CompositeVideo/CompositeVideo.ino:148:33: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
graphics.print("free memory: ");
^
/home/brad/ESP32CompositeVideo/CompositeVideo/CompositeVideo.ino:150:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
graphics.print(" fps: ");
^
/home/brad/ESP32CompositeVideo/CompositeVideo/CompositeVideo.ino:152:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
graphics.print(" triangles/s: ");
^
In file included from /home/brad/ESP32CompositeVideo/CompositeVideo/CompositeVideo.ino:11:0:
/tmp/arduino_build_296062/sketch/Mesh.h: In instantiation of 'Mesh::Mesh(int, const float ()[3], int, const short unsigned int ()[2], int, const short unsigned int ()[3], const float ()[3]) [with Graphics = CompositeGraphics]':
/home/brad/ESP32CompositeVideo/CompositeVideo/CompositeVideo.ino:40:141: required from here
Mesh.h:11:28: error: 'Mesh::vertices' will be initialized after [-Werror=reorder]
const float (*vertices)[3];
^
Mesh.h:10:7: error: 'int Mesh::edgeCount' [-Werror=reorder]
int edgeCount;
^
Mesh.h:18:3: error: when initialized here [-Werror=reorder]
Mesh(int vertCount, const float verts[][3], int edgeCount_ = 0, const unsigned short edges_[][2] = 0, int triCount = 0, const unsigned short tris[][3] = 0, const float triNorms[][3] = 0)
^
Mesh.h:16:34: error: 'Mesh::edges' will be initialized after [-Werror=reorder]
const unsigned short (*edges)[2];
^
Mesh.h:9:7: error: 'int Mesh::triangleCount' [-Werror=reorder]
int triangleCount;
^
Mesh.h:18:3: error: when initialized here [-Werror=reorder]
Mesh(int vertCount, const float verts[][3], int edgeCount_ = 0, const unsigned short edges_[][2] = 0, int triCount = 0, const unsigned short tris[][3] = 0, const float triNorms[][3] = 0)
^
Mesh.h:15:38: error: 'Mesh::triangles' will be initialized after [-Werror=reorder]
const unsigned short (triangles)[3];
^
Mesh.h:12:35: error: 'const float (
Mesh::triangleNormals)[3]' [-Werror=reorder]
const float (*triangleNormals)[3];
^
Mesh.h:18:3: error: when initialized here [-Werror=reorder]
Mesh(int vertCount, const float verts[][3], int edgeCount_ = 0, const unsigned short edges_[][2] = 0, int triCount = 0, const unsigned short tris[][3] = 0, const float triNorms[][3] = 0)
^
cc1plus: some warnings being treated as errors
exit status 1
'Mesh::vertices' will be initialized after [-Werror=reorder]

@vslinuxdotnet
Copy link

Some problem there +1

@vslinuxdotnet
Copy link

The problem is the order of variables in the instance Mesh class.
change the order in top of the Mesh.h file to:

template<class Graphics>
class Mesh
{
  public:
  int vertexCount;
  const float (*vertices)[3];
  int edgeCount;
  const unsigned short (*edges)[2];
  int triangleCount;
  const unsigned short (*triangles)[3];
  const float (*triangleNormals)[3];
  short (*tvertices)[3];
  signed char (*tTriNormals)[3];

Regards
VS

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

No branches or pull requests

2 participants