Linking 3rd party object file

Hi, we would have to link a 3rd party object file to our project.

I tried to add this file to Project->Properties->C/C++ Build->Settings->ARM ELF GCC C++ Linker->Expert settings command line pattern as

“${COMMAND} C:\wavecom_projects\test\obj\testlib.o -Wl,–script,gcc.lkopt ${INPUTS}…”

but the linker seems to complain with

C:\wavecom_projects\test\obj\testlib.o: file not recognized: File format not recognized

Is there any better way for doing this? Should the object file to be compiled with exactly same M2M Studio and OpenAT OS versions?

Then that object file will have to be designed to work with Open-AT, and in a format recognised & suported by the Developer Studio.

The same applies when trying to use any 3rd-party file on any platform!

You really need to discuss this with the 3rd party supplier!

The Developer Studio does not recognise the file format - so you cannot use it!

Hi, thanks for your comments. Naturally the object file has been developed and compiled with M2M Studio & OpenAT.
Inspecting the object file with hex editor shows it to be compiled to OS 6.35.0 whereas we use 6.31.0.

Even if it has been built with DS, you have also to make sure that it has been compiled with the same toolchain that you’re using for linking your app. Toolchains are mainly incompatible (i.e. most of time objects built by a first one can’t be linked by another one); the only exception is ARM RVDS 4.0 and ARM EABI GCC toolchains, which can interwork properly.

Another tip: rather than modifying the linker command line, you should use the Miscellaneous > Other Objects list option of the linker to add external objects to your application: it will put it in the right order on the command line (since the linker cares of the objects order on the command line).