How do I cross-compile to a different platform?

You may have the OSS ASN.1 compiler running on one platform and use it to cross-compile to any other platform for which you have a licensed runtime. To cross-compile all you need to do is to run the OSS ASN.1 compiler specifying a configuration asn1dflt-file supplied for that platform as the first file on the ASN.1 compiler command line. For example, to crosscompile from Windows to Solaris, you would say:

asn1 asn1dflt.solaris <the rest of the options>

The result of the above command would be the output that can be used directly on the target platform, Solaris in the above case.

Some of the platforms and C/C++ compilers (such as Windows) have multiple asn1dflt-files for each packing option supported, such as /Zp1 /Zp2 /Zp4 /Zp8. So when cross-compiling to Windows, you should be cautious and use the asn1dflt-file that matches the C/C++ compiler packing option that you are going to use. For example, for the VC++ compiler the asn1dflt-files are:

asn1dflt.ms.zp1
asn1dflt.ms.zp2
asn1dflt.ms.zp4
asn1dflt.ms.zp8

The samples included with some of the Knowledge Center answers are meant for your general understanding of the OSS products. Different versions of the products might produce slightly different outputs. Consult the products documentation and samples for the most up-to-date products information and code examples.



Contact Support
contact Our office hours
24 hours/day, 7 days/week

  • Phone: 1-888-OSS-2761 (USA and Canada)
  • Phone: 1-732-302-9669 (International)
  • Fax: 1-732-302-0023
  • Email: support@oss.com
Free Trial
download

Test drive the OSS Nokalva ASN.1, LTE, and XML Tools now! Your trial includes complete software, documentation, sample programs, free 24x7 technical support and more.




Learn ASN.1
Learn ASN.1

Our expert personnel can help you learn ASN.1!

We offer 4-day ASN.1 courses at our headquarters or your premises.