-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling the example failed when compiling the ASN1 files with -fcompound-names (complex names for variable types) #77
Comments
Update: The issue of not finding skeleton headers has been solved by specifying the path where to search for headers using
Now, I've another issue, the cc compiler tell me that several types begining with
When I search for the definition of the
and in
The header Do I have to specify the order to the compiler? |
By trying to compile with make instead of cc, I think I figured out where the problem is coming from. Some data types are not defined. I've checked for these types in all headers and I didn't find any definition for them.
I mention that when compiling the ASN1 file, I have lots of warnings:
I am using the ASN1 spec of NGAP (3GPP 38413 v16.5.0) according to the standard compliant with ITU-T Rec X.691, IUT-T Rec X.680 and ITU-T Rec X.681 |
I don't think I can help with this problem, as 3GPP NGAP tends to push ASN.1 to limits that this compiler currently doesn't seem to support. Please see #48 , and maybe folks at the upstream would be able to help. Also, @brchiu and @velichkov do you have any recommendation or workaround here? |
Hello @mouse07410 mouse07410 I'm now able to compile the ASN1 files with both https://github.com/mouse07410/asn1c/ and https://github.com/velichkov/asn1c forks. When trying to compile the converter example, there is some errors to solve manually (false declarations of variables in funtions). I'll put here the command I used to compile, when I'll have access to my another PC. Thank you, |
I would like to say thanks fo your effort. |
@raoufkh you're very welcome. It would be great if you could post your workaround here, as I'm sure it would be helpful for many others facing the same problem. Thanks! |
I've compiled asn1c as shown in the documentation. Then I use this command to compile ASN files.
Then I compile the converter example:
Then I corrected manually errors by replacing the not defined variables. In ly case, You can then recompile and you'll have the example executable. |
Thanks. But I think your post needs correction. First - instead of showing the compile command for the converter example, you showed again the ASN.1 compiling. Second - I think it would be useful for everybody to see exactly what you replaced the missing names with. I also don't think you need to explicitly set the |
Because without these parameters (except -gen-APER which is enabled by default), I wasn't able to to confine errors in only one. So I recommend to use Then, the paramater to correct change from one compilation to another but it begins always by I'll explain more the message error: this variablewas used in a function were it wasn't defined locally. The parameter in the function was The compiler Is that more clear? |
I meant that the
I don't think I'd agree with
What I wanted to see here was what to change it to. I.e., you're changing
That's great to know. I'd still prefer to see it explicitly posted here. Something like
Yes, thanks - but some more clarification would help, I think. |
Ah okay I see better now what you want to see
|
That it was proposed by compiler does NOT mean it is correct for encoding decoding, just that the name is similar enough! This is likely an issue of including the required headers in the right order, which sometimes can be hard... |
Hello,
I've been able to compile the ASN file from 3GPP TS 38.413 (NGAP) v16.5.0 using asn1c from the
vlm_master
branch of this fork by running the following command:The result is:
Q1: My first question is: is it possible to get only one .h file for that protocol (NGAP)?
I want then to use that library for parsing NGAP messages in C language.
Then when I try to compile the example using
cc
ormake
I have the following errors:while I can see that these headers are available in the current directory.
Q2: So how to make the compiler aware of the location of these local headers?
The text was updated successfully, but these errors were encountered: