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. Error In Cross Compiling

Error in cross compiling

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 Techapirant , 29 October, 2019
Forums
Gurux.DLMS

Hello,

I am trying to cross compile DLMS ANSI C stack files using arm-arago-linux-gnueabi/gcc compiler.
When I create obj and lib directories in development folder and run make command I am getting error as
Error In
src/client.c : In function 'cl_getApplicationAssociationRequest':
error: 'dlmsVARIANT' has no member named 'byteArr' at line 245

Can you please tell me how can I cross compile ?

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

We are using several different compilers, but not gnueabi.
What compiler parameters you are using?

BR,
Mikko

Techapirant

6 years 7 months ago

From where I can get compiler

From where I can get compiler parameters ? I have only replaced arm-arago-linux-gnueabi/gcc in make file instead of gcc

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

You have changed your make file to:
CC = arm-linux-gnueabi-gcc

It works like expected in out test device (Ubunty 64 bit).

Can you run this:
arm-linux-gnueabi-gcc --version

What is your version number?

BR,
Mikko

Techapirant

6 years 7 months ago

arm-linux-gnueabi-gcc (Ubuntu

arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.3-12ubuntuu1) 4.7.3

My system is ubuntu 32bit 14.04 LTS

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

Test linux is Ubuntu 16.04.6 LTS.
gcc is (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

It works like expected. Have you ignore any functionality or is this version what you get from github?

BR,

Mikko

Techapirant

6 years 7 months ago

Thanks able to compile

Thanks able to compile successfully.

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi, Good to hear. BR, Mikko

Hi,

Good to hear.

BR,
Mikko

Techapirant

6 years 7 months ago

Using lib file I am getting

Using lib file I am getting error
/home/user/Desktop/Mi/GuruxDLMS.c-master/development/lib/libgurux_dlms_c.a(dlms.o): In function `dlms_getHdlcData':
dlms.c:(.text+0x49f8): undefined reference to `svr_isTarget'
/home/user/Desktop/Mi/GuruxDLMS.c-master/development/lib/libgurux_dlms_c.a(dlms.o): In function `dlms_handledGloDedRequest':
dlms.c:(.text+0x6f24): undefined reference to `svr_isTarget'
dlms.c:(.text+0x6f70): undefined reference to `svr_connected'
/home/user/Desktop/Mi/GuruxDLMS.c-master/development/lib/libgurux_dlms_c.a(gxget.o): In function `getLNAccessRights':
gxget.c:(.text+0x1620): undefined reference to `svr_getAttributeAccess'
gxget.c:(.text+0x1798): undefined reference to `svr_getMethodAccess'
/home/user/Desktop/Mi/GuruxDLMS.c-master/development/lib/libgurux_dlms_c.a(gxget.o): In function `getSNAccessRights':
gxget.c:(.text+0x2db4): undefined reference to `svr_getAttributeAccess'
gxget.c:(.text+0x2efc): undefined reference to `svr_getMethodAccess'

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

It's interesting that those errors are not coming in our environment, but you can skip those errors
if you copy src and include forlders under development folder to GuruxDLMSServerExample2/dlms folder.

Then try to run make in GuruxDLMSServerExample2.

BR,

Mikko

Techapirant

6 years 7 months ago

Actually example program

Actually example program compiled successfully but when i link lib to my program it throws those error during compilation

Techapirant

6 years 7 months ago

I am passing value to GLFLAGS

I am passing value to GLFLAGS as
-L/home/parth/Desktop/DLMS_32/GuruxDLMS.c-master/development/lib /home/parth/Desktop/DLMS_32/GuruxDLMS.c-master/GuruxDLMSClientExample/obj/communication.o /home/parth/Desktop/DLMS_32/GuruxDLMS.c-master/GuruxDLMSClientExample/obj/connection.o /home/parth/Desktop/DLMS_32/GuruxDLMS.c-master/GuruxDLMSClientExample/obj/getopt.o

and LLIBS = -lgurux_dlms_c

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

Are you doing the client app?
add empty skeletons for missing methods. You can find them from server examples.

BR,

Mikko

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

You can also define DLMS_IGNORE_SERVER. In that way, server-side functionality is not included and size is smaller.

BR,
Mikko

Techapirant

6 years 7 months ago

where to defined DLMS_IGNORE

where to defined DLMS_IGNORE_SERVER

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

You can open gxignore.h file and un-comment it or then you can give it as compiler parameter.
-DDLMS_IGNORE_SERVER

BR,

Mikko

Techapirant

6 years 7 months ago

Ok I will try.

Ok I will try.
one more query when my client program completes reading data my meter shows HDLC on its display for few seconds.
So i am not able to read from meter on continous basis I have to wait for that HDLC message to go off and then only i can reconnect through my client program.

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

Are you sending disconnect message? Some meters require also release. Send those and connection is closed. There is inactivity timeout after connection is releaset if you don't call those methods.

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

Who's new

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