Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Can't Compile DLMC Cpp On G++ 13

Can't compile DLMC cpp on g++ 13

Profile picture for user Dmitry
By Dmitry , 22 February, 2025
Forums
Gurux.DLMS

Hi, Mikko!

I try compile DLMS cpp. In console (Linux Mint) i do:
make (in Gurux.DLMS.cpp/development/ path) but get many errors:

In file included from src/../include/GXPlcSettings.h:41,
from src/../include/GXDLMSSettings.h:41,
from src/../include/GXAPDU.h:42,
from src/GXAPDU.cpp:35:
src/../include/GXDLMSPlcRegister.h:44:5: error: ‘uint16_t’ does not name a type
44 | uint16_t m_AllowedTimeSlots;
| ^~~~~~~~
src/../include/GXDLMSPlcRegister.h:1:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
+++ |+#include <cstdint>
1 | //
src/../include/GXDLMSPlcRegister.h:59:5: error: ‘uint16_t’ does not name a type
59 | uint16_t GetAllowedTimeSlots()
| ^~~~~~~~
src/../include/GXDLMSPlcRegister.h:59:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXDLMSPlcRegister.h:64:30: error: ‘uint16_t’ has not been declared
64 | void SetAllowedTimeSlots(uint16_t value)
| ^~~~~~~~
src/../include/GXDLMSPlcRegister.h: In member function ‘void CGXDLMSPlcRegister::SetAllowedTimeSlots(int)’:
src/../include/GXDLMSPlcRegister.h:66:9: error: ‘m_AllowedTimeSlots’ was not declared in this scope; did you mean ‘SetAllowedTimeSlots’?
66 | m_AllowedTimeSlots = value;
| ^~~~~~~~~~~~~~~~~~
| SetAllowedTimeSlots
In file included from src/../include/GXPlcSettings.h:42:
src/../include/GXDLMSPlcMeterInfo.h: At global scope:
src/../include/GXDLMSPlcMeterInfo.h:48:5: error: ‘uint16_t’ does not name a type
48 | uint16_t m_SourceAddress;
| ^~~~~~~~
src/../include/GXDLMSPlcMeterInfo.h:1:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
+++ |+#include <cstdint>
1 | //
src/../include/GXDLMSPlcMeterInfo.h:53:5: error: ‘uint16_t’ does not name a type
53 | uint16_t m_DestinationAddress;
| ^~~~~~~~
src/../include/GXDLMSPlcMeterInfo.h:53:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXDLMSPlcMeterInfo.h:65:5: error: ‘uint16_t’ does not name a type
65 | uint16_t GetSourceAddress()
| ^~~~~~~~
src/../include/GXDLMSPlcMeterInfo.h:65:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXDLMSPlcMeterInfo.h:70:27: error: ‘uint16_t’ has not been declared
70 | void SetSourceAddress(uint16_t value)
| ^~~~~~~~
src/../include/GXDLMSPlcMeterInfo.h:78:5: error: ‘uint16_t’ does not name a type
78 | uint16_t GetDestinationAddress()
| ^~~~~~~~
src/../include/GXDLMSPlcMeterInfo.h:78:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXDLMSPlcMeterInfo.h:83:32: error: ‘uint16_t’ has not been declared
83 | void SetDestinationAddress(uint16_t value)
| ^~~~~~~~
src/../include/GXDLMSPlcMeterInfo.h: In member function ‘void CGXDLMSPlcMeterInfo::SetSourceAddress(int)’:
src/../include/GXDLMSPlcMeterInfo.h:72:9: error: ‘m_SourceAddress’ was not declared in this scope; did you mean ‘SetSourceAddress’?
72 | m_SourceAddress = value;
| ^~~~~~~~~~~~~~~
| SetSourceAddress
src/../include/GXDLMSPlcMeterInfo.h: In member function ‘void CGXDLMSPlcMeterInfo::SetDestinationAddress(int)’:
src/../include/GXDLMSPlcMeterInfo.h:85:9: error: ‘m_DestinationAddress’ was not declared in this scope; did you mean ‘SetDestinationAddress’?
85 | m_DestinationAddress = value;
| ^~~~~~~~~~~~~~~~~~~~
| SetDestinationAddress
src/../include/GXPlcSettings.h: At global scope:
src/../include/GXPlcSettings.h:74:5: error: ‘uint16_t’ does not name a type
74 | uint16_t m_MacSourceAddress;
| ^~~~~~~~
src/../include/GXPlcSettings.h:43:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
42 | #include "GXDLMSPlcMeterInfo.h"
+++ |+#include <cstdint>
43 |
src/../include/GXPlcSettings.h:78:5: error: ‘uint16_t’ does not name a type
78 | uint16_t m_MacDestinationAddress;
| ^~~~~~~~
src/../include/GXPlcSettings.h:78:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXPlcSettings.h:86:5: error: ‘uint16_t’ does not name a type
86 | uint16_t m_AllowedTimeSlots;
| ^~~~~~~~
src/../include/GXPlcSettings.h:86:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXPlcSettings.h:124:5: error: ‘uint16_t’ does not name a type
124 | uint16_t GetMacSourceAddress();
| ^~~~~~~~
src/../include/GXPlcSettings.h:124:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXPlcSettings.h:125:30: error: ‘uint16_t’ has not been declared
125 | void SetMacSourceAddress(uint16_t value);
| ^~~~~~~~
src/../include/GXPlcSettings.h:130:5: error: ‘uint16_t’ does not name a type
130 | uint16_t GetMacDestinationAddress();
| ^~~~~~~~
src/../include/GXPlcSettings.h:130:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXPlcSettings.h:131:35: error: ‘uint16_t’ has not been declared
131 | void SetMacDestinationAddress(uint16_t value);
| ^~~~~~~~
src/../include/GXPlcSettings.h:142:5: error: ‘uint16_t’ does not name a type
142 | uint16_t GetAllowedTimeSlots();
| ^~~~~~~~
src/../include/GXPlcSettings.h:142:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXPlcSettings.h:143:30: error: ‘uint16_t’ has not been declared
143 | void SetAllowedTimeSlots(uint16_t value);
| ^~~~~~~~
src/../include/GXPlcSettings.h:182:45: error: ‘uint16_t’ has not been declared
182 | int ParseDiscover(CGXByteBuffer& value, uint16_t sa, uint16_t da, std::vector<CGXDLMSPlcMeterInfo>& list);
| ^~~~~~~~
src/../include/GXPlcSettings.h:182:58: error: ‘uint16_t’ has not been declared
182 | int ParseDiscover(CGXByteBuffer& value, uint16_t sa, uint16_t da, std::vector<CGXDLMSPlcMeterInfo>& list);
| ^~~~~~~~
In file included from src/../include/GXAsn1Integer.h:39,
from src/../include/GXAsn1Converter.h:46,
from src/../include/GXPrivateKey.h:39,
from src/../include/GXCipher.h:39,
from src/../include/GXDLMSSettings.h:43:
src/../include/GXBigInteger.h:48:5: error: ‘uint32_t’ does not name a type
48 | uint32_t* m_Data;
| ^~~~~~~~
src/../include/GXBigInteger.h:1:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
+++ |+#include <cstdint>
1 | //
src/../include/GXBigInteger.h:53:5: error: ‘uint16_t’ does not name a type
53 | uint16_t m_Count;
| ^~~~~~~~
src/../include/GXBigInteger.h:53:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXBigInteger.h:58:5: error: ‘uint16_t’ does not name a type
58 | uint16_t m_Capacity;
| ^~~~~~~~
src/../include/GXBigInteger.h:58:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXBigInteger.h:77:19: error: ‘uint32_t’ does not name a type
77 | int Add(const uint32_t value);
| ^~~~~~~~
src/../include/GXBigInteger.h:77:19: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXBigInteger.h:79:18: error: ‘uint32_t’ has not been declared
79 | int AddValue(uint32_t* list,
| ^~~~~~~~
src/../include/GXBigInteger.h:80:9: error: ‘uint16_t’ has not been declared
80 | uint16_t length,
| ^~~~~~~~
src/../include/GXBigInteger.h:81:9: error: ‘uint32_t’ has not been declared
81 | uint32_t value,
| ^~~~~~~~
src/../include/GXBigInteger.h:82:9: error: ‘uint16_t’ has not been declared
82 | uint16_t index);
| ^~~~~~~~
src/../include/GXBigInteger.h:84:18: error: ‘uint16_t’ has not been declared
84 | int Capacity(uint16_t value);
| ^~~~~~~~
src/../include/GXBigInteger.h:98:27: error: expected ‘)’ before ‘value’
98 | CGXBigInteger(uint64_t value);
| ~ ^~~~~~
| )
src/../include/GXBigInteger.h:100:27: error: expected ‘)’ before ‘value’
100 | CGXBigInteger(uint32_t value);
| ~ ^~~~~~
| )
src/../include/GXBigInteger.h:107:25: error: ‘uint32_t’ does not name a type
107 | CGXBigInteger(const uint32_t* values, uint16_t count);
| ^~~~~~~~
src/../include/GXBigInteger.h:107:25: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXBigInteger.h:107:43: error: ‘uint16_t’ has not been declared
107 | CGXBigInteger(const uint32_t* values, uint16_t count);
| ^~~~~~~~
src/../include/GXBigInteger.h:114:48: error: ‘uint16_t’ has not been declared
114 | CGXBigInteger(const unsigned char* values, uint16_t count);
| ^~~~~~~~
src/../include/GXBigInteger.h:142:5: error: ‘uint16_t’ does not name a type
142 | uint16_t GetCount();
| ^~~~~~~~
src/../include/GXBigInteger.h:142:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXBigInteger.h:147:19: error: ‘uint16_t’ has not been declared
147 | void SetCount(uint16_t value);
| ^~~~~~~~
src/../include/GXBigInteger.h:189:17: error: ‘uint32_t’ has not been declared
189 | int ToArray(uint32_t start,
| ^~~~~~~~
src/../include/GXBigInteger.h:190:9: error: ‘uint32_t’ has not been declared
190 | uint32_t size,
| ^~~~~~~~
src/../include/GXBigInteger.h:193:24: error: ‘uint32_t’ does not name a type
193 | int AddRange(const uint32_t* values, uint16_t count);
| ^~~~~~~~
src/../include/GXBigInteger.h:193:24: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXBigInteger.h:193:42: error: ‘uint16_t’ has not been declared
193 | int AddRange(const uint32_t* values, uint16_t count);
| ^~~~~~~~
src/../include/GXBigInteger.h:210:17: error: ‘uint32_t’ has not been declared
210 | int Compare(uint32_t value);
| ^~~~~~~~
src/../include/GXBigInteger.h:212:17: error: ‘uint32_t’ has not been declared
212 | void Lshift(uint32_t amount);
| ^~~~~~~~
src/../include/GXBigInteger.h:214:17: error: ‘uint32_t’ has not been declared
214 | void Rshift(uint32_t amount);
| ^~~~~~~~
src/../include/GXBigInteger.h:221:14: error: ‘uint32_t’ has not been declared
221 | void Pow(uint32_t exponent);
| ^~~~~~~~
src/../include/GXBigInteger.h:243:5: error: ‘uint16_t’ does not name a type
243 | uint16_t GetUsedBits();
| ^~~~~~~~
src/../include/GXBigInteger.h:243:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXBigInteger.h:250:19: error: ‘uint16_t’ has not been declared
250 | bool IsBitSet(uint16_t index);
| ^~~~~~~~
src/../include/GXAsn1Integer.h:107:28: error: expected ‘)’ before ‘data’
107 | CGXAsn1Integer(uint64_t data)
| ~ ^~~~~
| )
In file included from src/../include/GXAsn1Converter.h:50:
src/../include/GXAsn1ObjectIdentifier.h: In static member function ‘static int CGXAsn1ObjectIdentifier::OidStringtoBytes(std::string&, CGXByteBuffer&)’:
src/../include/GXAsn1ObjectIdentifier.h:137:9: error: ‘uint64_t’ was not declared in this scope
137 | uint64_t v = atol(arr.at(0).c_str()) * 40;
| ^~~~~~~~
src/../include/GXAsn1ObjectIdentifier.h:1:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
+++ |+#include <cstdint>
1 | //
src/../include/GXAsn1ObjectIdentifier.h:138:9: error: ‘v’ was not declared in this scope
138 | v += atol(arr.at(1).c_str());
| ^
In file included from src/../include/GXCipher.h:41:
src/../include/GXx509Certificate.h: At global scope:
src/../include/GXx509Certificate.h:244:9: error: ‘uint16_t’ has not been declared
244 | uint16_t length,
| ^~~~~~~~
src/../include/GXCipher.h:84:20: error: ‘uint32_t’ has not been declared
84 | static int Int(uint32_t* rk,
| ^~~~~~~~
src/../include/GXCipher.h:212:9: error: ‘uint64_t’ has not been declared
212 | uint64_t& InvocationCounter);
| ^~~~~~~~
src/../include/GXDLMSSettings.h:203:5: error: ‘uint64_t’ does not name a type
203 | uint64_t m_ExpectedInvocationCounter;
| ^~~~~~~~
src/../include/GXDLMSSettings.h:44:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
43 | #include "GXCipher.h"
+++ |+#include <cstdint>
44 |
src/../include/GXDLMSSettings.h:506:5: error: ‘uint64_t’ does not name a type
506 | uint64_t GetExpectedInvocationCounter();
| ^~~~~~~~
src/../include/GXDLMSSettings.h:506:5: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/../include/GXDLMSSettings.h:507:39: error: ‘uint64_t’ has not been declared
507 | void SetExpectedInvocationCounter(uint64_t uint32_t);
| ^~~~~~~~
src/GXAPDU.cpp: In static member function ‘static int CGXAPDU::ParseInitiate(bool, CGXDLMSSettings&, CGXCipher*, CGXByteBuffer&, CGXDLMSTranslatorStructure*)’:
src/GXAPDU.cpp:849:17: error: ‘uint64_t’ was not declared in this scope
849 | uint64_t invocationCounter;
| ^~~~~~~~
src/GXAPDU.cpp:39:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
38 | #include "../include/GXDLMSConverter.h"
+++ |+#include <cstdint>
39 |
src/GXAPDU.cpp:852:44: error: ‘invocationCounter’ was not declared in this scope
852 | data, security, suite, invocationCounter)) != 0)
| ^~~~~~~~~~~~~~~~~
src/GXAPDU.cpp:883:9: error: ‘uint64_t’ was not declared in this scope
883 | uint64_t invocationCounter;
| ^~~~~~~~
src/GXAPDU.cpp:883:9: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
src/GXAPDU.cpp:885:79: error: ‘invocationCounter’ was not declared in this scope
885 | settings.GetCipher()->GetBlockCipherKey(), data, security, suite, invocationCounter)) != 0)
| ^~~~~~~~~~~~~~~~~
src/GXAPDU.cpp:897:22: error: ‘class CGXDLMSSettings’ has no member named ‘GetExpectedInvocationCounter’; did you mean ‘SetExpectedInvocationCounter’?
897 | if (settings.GetExpectedInvocationCounter() != 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| SetExpectedInvocationCounter
src/GXAPDU.cpp:899:17: error: ‘invocationCounter’ was not declared in this scope
899 | if (invocationCounter != settings.GetExpectedInvocationCounter())
| ^~~~~~~~~~~~~~~~~
src/GXAPDU.cpp:899:47: error: ‘class CGXDLMSSettings’ has no member named ‘GetExpectedInvocationCounter’; did you mean ‘SetExpectedInvocationCounter’?
899 | if (invocationCounter != settings.GetExpectedInvocationCounter())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| SetExpectedInvocationCounter
src/GXAPDU.cpp:903:55: error: ‘invocationCounter’ was not declared in this scope
903 | settings.SetExpectedInvocationCounter(1 + invocationCounter);
| ^~~~~~~~~~~~~~~~~
make: *** [makefile:64: obj/GXAPDU.o] Error 1

About g++:
g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0

Profile picture for user Kurumi

Kurumi

1 year 3 months ago

Hi, This is fixed to version…

Hi,

This is fixed to version 20250227.1.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin