The OSS ASN.1/C++ Compiler has default settings for all global directives, as described in the ASN.1/C++ Compiler Directives Reference. A custom compiler configuration file can be created with different default settings, if desired. A configuration file is necessary only if you prefer to use a different set of default values or when cross-compiling is required (see below). In the latter case, OSS provides the configuration file.
By default, the ASN.1/C++ Compiler generates files for use on the operating system where the compiler executable runs. However, the compiler can be instructed to produce files for use on a different operating system by passing the asn1dflt file for the target system as the first input file on the command-line.
OSS Nokalva provides asn1dflt configuration files to use when cross-compiling. asn1dflt configuration files contain only comments and directives; these directives are used instead of those the ASN.1/C++ Compiler uses by default. The directives in the asn1dflt file remain in effect for the entire run of the compiler.
asn1cpp asn1dflt.cpp.solaris7-64bit abc.asn
asn1dflt.cpp.solaris7-64bit is the name of the asn1dflt file for the 64-bit Solaris 7 platform and is included in the ASN.1/C++ Tools for 64-bit Solaris 7 target software. Every OSS ASN.1 Tools target software distribution contains an asn1dflt file for that specific target platform.
After cross-compiling, copy the generated output files to the target platform machine where the application is being developed. Incorporate the generated files into the application in the usual way.
As noted above, the ASN.1/C++ Compiler for Windows generates files with an 8-byte alignment (/Zp8). The OSS ASN.1 Tools for Windows also includes asn1dflt files with different data-alignment options:
prompt%> asn1cpp asn1dflt.ms.zp8 abc.asnThis is the default for the OSS ASN.1 Tools for C++ on Windows.
prompt%> asn1cpp asn1dflt.ms.zp1 abc.asn
prompt%> asn1cpp asn1dflt.linux-x86 abc.asn
After cross-compilation, copy the generated output files to the target machine. Then integrate the generated files into your application.
This documentation applies to release 6.7 and later of the OSS® ASN.1 Tools for C++.
Copyright © 2020 OSS Nokalva, Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise, without the prior permission of OSS Nokalva, Inc.
Every distributed copy of the OSS® ASN.1 Tools for C++ is associated with a specific license and related unique license number. That license determines, among other things, what functions of the OSS ASN.1 Tools for C++ are available to you.