|
|||||||||||
Technical Support On-Line Manuals Migration and Compatibility Guide ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Compatibility of C++ objects
4.7 Compatibility of C++ objectsThe compatibility of C++ objects compiled with Arm® Compiler 5 depends on the C++ libraries used. Compatibility with objects compiled using Rogue Wave standard library headersArm Compiler 6 does not support binary compatibility with objects compiled using the Rogue Wave standard library include files. There are warnings at link time when objects are mixed. The impact of mixing objects that have been compiled against different C++ standard library headers might include:
If you have Arm Compiler 6 objects that have been compiled with the legacy -stdlib=legacy_cpplib option then these objects use the Rogue Wave standard library and therefore might be incompatible with objects created using Arm Compiler 6.4 or later. To resolve these issues, you must recompile all object files with Arm Compiler 6.4 or later. Compatibility with C++ objects compiled using Arm® Compiler 5The choice of C++ libraries at link time must match the choice of C++ include files at compile time for all input objects. Arm Compiler 5 objects that use the Rogue Wave C++ libraries are not compatible with Arm Compiler 6 objects. Arm Compiler 5 objects that use C++ but do not make use of the Rogue Wave header files can be compatible with Arm Compiler 6 objects that use libc++ but this is not guaranteed. Arm recommends using Arm Compiler 6 for building the object files. Compatibility of arrays of objects compiled using Arm® Compiler 5Arm Compiler 6 is not compatible with
objects from Arm Compiler 5
that use operator construct.cpp: class Foo { public: Foo() : x_(new int) { *x_ = 0; } void setX(int x) { *x_ = x; } ~Foo() { delete x_; } private: int* x_; }; void func(void) { Foo* array; array = new Foo [10]; array[0].setX(1); delete[] array; } If you build this example with the Arm Compiler 5 compiler, armcc, and link with the Arm Compiler 6 linker, armlink, using: armcc -c construct.cpp -Ospace -O1 --cpu=cortex-a9 armlink construct.o -o construct.axf the linker reports: Error: L6218E: Undefined symbol __aeabi_vec_delete (referred from construct.o). Error: L6218E: Undefined symbol __aeabi_vec_new_cookie_nodtor (referred from construct.o). To resolve these linker errors, you must use the Arm Compiler 6 compiler,
armclang, to compile all C++ files that use the Note:You do not have to specify--stdlib=libc++ for
armlink, because this is the default and only option in Arm Compiler 6.4, and
later.Related information | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.