Ημερήσια αρχεία: 15 Ιανουαρίου 2017


asn1c: undefined reference to `SET_OF_encode_uper’

The following post is for the https://lionet.info/asn1c/ (repository: https://github.com/vlm/asn1c/)

When trying to link an ASN.1 structure that uses a SET OF, with support for Unaligned Packed Encoding Rules (UPER), we get the following error: undefined reference to 'SET_OF_encode_uper'.

Unfortunately, there is currently no solution for this problem, so we replaced the SET OF with a SEQUENCE OF.

The SEQUENCE OF type is the list (array) of simple or constructed types. The SET OF type models the bag of structures. It resembles the SEQUENCE OF type, but the order is not important: i.e. the elements may arrive in the order which is not necessarily the same as the in-memory order on the remote machines.

— From http://lionet.info/asn1c/asn1c-usage.html

Original (problematic) code

Elements ::= SEQUENCE
{
    property INTEGER,
    objects SET OF object
}

Updated (working) code

Elements ::= SEQUENCE
{
    property INTEGER,
    objects SEQUENCE OF object
}