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. Forums
  3. Make Gurux.DLMS.cpp Client Example

make Gurux.DLMS.cpp Client Example

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Lotusv , 27 May, 2021
Forums
General discussion

Tried to make Gurux.DLMS.cpp\GuruxDLMSClientExample

First the error appeared:

In file included from src/../include/../../development/include/GXDLMSSettings.h:41,
from src/../include/../../development/include/GXDLMS.h:42,
from src/../include/../../development/include/GXDLMSClient.h:38,
from src/../include/../../development/include/GXDLMSSecureClient.h:38,
from src/../include/communication.h:68,
from src/communication.cpp:35:
src/../include/../../development/include/GXPlcSettings.h:40:10: fatal error: GXByteBuffer.h: No such file or directory
#include "GXByteBuffer.h"

In folder /development/include/folder contains only the GXBytebuffer.h file. I copied it to GXByteBuffer.h. Because the code also needs a file with a small "b".

An error occurred during assembly:

src/communication.cpp: In member function ‘int CGXCommunication::Open(const char*, int)’:
src/communication.cpp:588:13: error: ‘iec’ was not declared in this scope
if (iec)
^~~
make: *** [makefile:31: obj/communication.o] Error 1

I have not been able to make project. How do I fix the error?

Profile picture for user Kurumi

Kurumi

5 years 3 months ago

Hi,

Hi,

Thank you for pointing this out. I made an issue from this and this is now in testing.
https://www.gurux.fi/node/18509

Change this line:
if (iec)
to
if (m_Parser->GetInterfaceType() == DLMS_INTERFACE_TYPE_HDLC_WITH_MODE_E)

The new version is released today.

BR,
Mikko

Lotusv

5 years 3 months ago

Thanks for the answer.

Thanks for the answer.
OK. I'll download the new version, check it out tomorrow!

Lotusv

5 years 3 months ago

The previous errors

The previous errors disappeared, the following appeared:

/usr/bin/ld: cannot find -lgurux_dlms_cpp
collect2: error: ld returned 1 exit status
make: *** [makefile:27: bin/gurux.dlms.client.bin] Error 1

Lotusv

5 years 3 months ago

I solved the problem.

I solved the problem.
https://www.gurux.fi/comment/11416#comment-11416

I went back and build the development project first , then resumed the server example build , and this time linker found it

Thanks, Mr Kurumi!

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202
  • Mon, 08/17/2026 - 09:47
    gurux.dlms.cpp 9.0.2608.1701
  • Mon, 08/17/2026 - 09:25
    gurux.dlms.c 9.0.2608.1701
  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701

New forum topics

  • Security vulnerability report — request for a private contact (GuruxDLMS.c / ANSI C)
  • Topic: Insufficient Memory Error When Reading Class 7 Profile Generic Objects
  • SN ReadResponse returns all-null values when response spans multiple HDLC frames
  • Gurux.Serial.Android 3.0.6 – CH340 (HL-340) USB-Serial Adapter Not Working,
  • Trying to talk to a L&G E360 meter (Using Python Gurux)
More

Who's new

  • cyby
  • Metin Onan
  • ssv007
  • 3nzol3dur
  • dw772
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin