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

Thanks for the answer.

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

Lotusv

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

  • 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

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin