If compiled with -DASN_PDU_COLLECTION and not defining a default PDU with -DPDU=xxx, this will require you to enter a -p option to select a PDU from a list.
If you only select -h, all options will be shown, and neither PER nor BER will be shown as the default.
If you select a PDU and also -h afterwards on the command line, it sets the default input option appropriately.
This allows compiling a generic converter-sample.c that can be linked against a library of compiled definitions that contains a pdu_collection file without having to define a default PDU.
This makes generating, e.g. rrc-dump, even easier;
Create a directory asn1lib; inside, do:
gcc -c -DASN_PDU_COLLECTION -I/usr/local/share/asn1c /usr/local/share/asn1c/*.c
ar -r asn1lib.a *.o
In another directory, compile the rrc source:
asn1c -fcompound-names -gen-PER -pdu=auto -R ../rrc.asn
gcc -c -I/usr/local/share/asn1c *.c
ar -r rcclib.a *.o
Now you can link them together with:
gcc -o rrc-dump asn1lib.a rrclib.a
(assuming you've moved both of the files into the same directory)
Building asn1lib.a and rrclib.a that way makes it a lot easier to use inside another project, and this makes it even easier to build a test reader/writer program.
Logged In: YES
user_id=56149
Originator: YES
Oops, just noticed I didn't parenthesize correctly, updated patch corrects that.
File Added: converter.patch
diff -u for skeletons/converter-sample.c