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. Node
  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

7 years ago

Hi,

Hi,

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

BR,
Mikko

Techapirant

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

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

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

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

7 years ago

Thanks able to compile

Thanks able to compile successfully.

Profile picture for user Kurumi

Kurumi

7 years ago

Hi, Good to hear. BR, Mikko

Hi,

Good to hear.

BR,
Mikko

Techapirant

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

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

7 years ago

Actually example program

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

Techapirant

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

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

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

7 years ago

where to defined DLMS_IGNORE

where to defined DLMS_IGNORE_SERVER

Profile picture for user Kurumi

Kurumi

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

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

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

  • Thu, 11/19/2026 - 10:57
    Gurux.DLMS.Python 1.0.204
  • Thu, 11/19/2026 - 10:12
    gurux.dlms.c 9.0.2611.1901
  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97
  • Tue, 09/22/2026 - 14:02
    Gurux.DLMS.Net 9.0.2609.2201
  • Mon, 09/21/2026 - 10:18
    Gurux.DLMS.Net 9.0.2609.2101

New forum topics

  • Landis E650 meter reading over DLMS
  • class_id = 40, version = 2, pushsetup Unparsed data frame
  • GXObisValueItem entries without MaskSize appear to be interpreted as bit flags
  • CheckedListBox incorrectly selects GXObisValueItem Value=0 for non-zero values
  • UIValueType=TextBox is rendered as CheckedListBox when Values are defined
More

Who's new

  • Sayang
  • q80435762@gmail.com
  • ONCAK
  • Berhasil
  • ratirvivege1979
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin