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 2 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 2 months ago

Thanks for the answer.

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

Lotusv

5 years 2 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 2 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

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
  • DLMS server - serving multiple similar datasets gathered from multiple meters across distinct logical addresses
More

Who's new

  • CTKNhZElptjSlOrpkXl
  • YCbccqfLGRMnlCWoJhXP
  • Malcolmactig
  • mhliang
  • Kevinmug
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin