Release version of SysInfoLib.lib not linkable to WinCE700 application

Since ToradexCELibrary V2.1, we have got compiler Errors if we use the Release Version of the SysInfoLib.lib and TdxCommonLib.lib:

..\..\source\device\lib\SysInfoLib.lib : fatal error LNK1262: link failed due to mismatched versions of 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm\c2.dll' and LINK.EXE

Is this because we use the Toradex_CE600 (ARMv4I) Version, but compile it for SDK Toradex_CE700 (ARM4I) ?
We solved the problem by always using the debug version of SysInfoLib.lib and TdxCommonLib.lib.

Dear @rgu
The main difference between the debug and the release version of our libraries is a compiler option “Enable link-time code generation”. This feature requires the *compiler* to process also our binary libraries.

It seems that your system setup uses a different compiler/linker version, even though our library packages were also built with VS2008 (Visual Studio 9.0). Maybe there is a Visual Studio Service Pack you didn’t install?

Please query the version of your executables (right-click on the file => Properties => Details)
I listed the File version / Product Version of my system in the list below.

  • C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm\c2.dll
    15.0.20720.0 / 9.00.20720
  • C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm\cl.exe
    15.0.20720.0 / 9.00.20720
  • C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm\link.exe
    9.0.21022.8 / 9.00.21022.08

Regards, Andy

Hi Andy

I checked my installed versions and my c2.dll differs from yours. I found also a backup folder containing the old dll. The newer c2.dll comes with hotfix KB2921525 which fixes the following:

"KB2921525 fixes the following issue:
Under certain conditions, the ARM compiler might introduce an error with floating point operations.
This update replaces the Microsoft Visual Studio 2008 ARM compiler with the Windows Embedded Compact 7 ARM compiler if Visual Studio 2008 is installed. "

Should we really uninstall this hotfix?

Thanks and BR

Hi @christian.s

I can confirm after installation of the KB2921525 (replace compiler) , I also got the error

fatal error LNK1262: link failed due to mismatched versions of 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm\c2.dll' and LINK.EXE

I tried to fix the error by installing the KB3029264 (replace compiler, linker and assembler), only to end up with a different error:

fatal error C1047: The object or library file '..\..\libs\lib\Toradex_CE600 (ARMv4I)Release\\SysInfoLib.lib' was created with an older compiler than other objects; rebuild old objects and libraries

Conclusion:

The optimization we activated for the V2.1 release is incompatible with different compiler/linker versions. We will soon release a new version of the Libraries (V2.2) with that optimization disabled. The library will then behave again like in Release V2.0 and older.

So far, as a workaround, you either need to use the debug version of the libraries, or uninstall the KB2921525.
If for any reason the uninstall fails, the original compiler/linker are stored in a backup folder C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm\KB2921525_BACKUP\

Regards, Andy

I have still the trouble with toradexcelibraries_2.2-20180516

Dear @rgu

There was another compiler flag we had to remove in order to get back the full compatibility.
It will be fixed in V2.3 of the libraries. Meanwhile you can use the preliminary release:

Regards, Andy