Kicad won't compile, missing cstdint
Adding #include to pcb_calculator/eserie.cpp fixes the problem. This is when compiling with g++-13.
In file included from ../../pcb_calculator/eserie.cpp:37:
../../pcb_calculator/eserie.h:114:21: error: ‘uint32_t’ has not been declared
114 | void SetSeries( uint32_t aSeries ) { m_series = aSeries; }
| ^~~~~~~~
../../pcb_calculator/eserie.h:135:5: error: ‘uint32_t’ does not name a type
135 | uint32_t combine2();
| ^~~~~~~~
../../pcb_calculator/eserie.h:1:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
+++ |+#include <cstdint>
1 | /*
../../pcb_calculator/eserie.h:143:27: error: ‘uint32_t’ has not been declared
143 | void simple_solution( uint32_t aSize );
| ^~~~~~~~
../../pcb_calculator/eserie.h:152:20: error: ‘uint32_t’ has not been declared
152 | void combine3( uint32_t aSize );
| ^~~~~~~~
../../pcb_calculator/eserie.h:162:20: error: ‘uint32_t’ has not been declared
162 | void combine4( uint32_t aSize );
| ^~~~~~~~
../../pcb_calculator/eserie.h:198:5: error: ‘uint32_t’ does not name a type
198 | uint32_t m_series = E6; // Radio Button State
| ^~~~~~~~
../../pcb_calculator/eserie.h:198:5: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
../../pcb_calculator/eserie.h:199:5: error: ‘uint32_t’ does not name a type
199 | uint32_t m_enable_4R = false; // Check Box 4R enable
| ^~~~~~~~
...
Description
The following fixes this issue and allows KiCad to run properly:
diff --git a/pcb_calculator/eserie.cpp b/pcb_calculator/eserie.cpp
index 293fa3947c..b3975aa2cb 100644
--- a/pcb_calculator/eserie.cpp
+++ b/pcb_calculator/eserie.cpp
@@ -21,6 +21,7 @@
#include <array>
#include <algorithm>
+#include <cstdint>
#include <calculator_panels/panel_eserie.h>
#include <wx/msgdlg.h>
Steps to reproduce
- Attempt to compile KiCad with gcc-13
KiCad Version
Application: KiCad
Version: (6.0.10-2-gf5b592e38c-dirty), release build
Libraries:
wxWidgets 3.2.1
libcurl/7.79.1 OpenSSL/1.1.1l-fips zlib/1.2.11 brotli/1.0.7 zstd/1.5.0 libidn2/2.2.0 libpsl/0.20.1 (+libidn2/2.2.0) libssh/0.9.6/openssl/zlib nghttp2/1.40.0 OpenLDAP/2.4.46
Platform: Linux 5.14.21-150400.24.33-default x86_64, 64 bit, Little endian, wxGTK, , x11
Build Info:
Date: Dec 19 2022 22:25:39
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.75.0
OCC: 7.5.3
Curl: 7.79.1
ngspice: 38
Compiler: GCC 13.0.0 with C++ ABI 1018
Build settings:
KICAD_USE_OCC=ON
KICAD_USE_EGL=ON
KICAD_SPICE=ON
Edited by Aaron Williams