none
Windows Embedded Compact 7 (WEC7) File Control (fcntl.h) and msvcrt.lib RRS feed

  • Question

  • I am currently working on porting a project that uses zlib (http://www.zlib.net/).

    In this case the target machine is running Windows Embedded Compact 7 on an ARM processor.  The development tools that I am using for this is Visual Studio 2008.

    The first issue that I am running into is that zlib is pointing towards fcntl.h (via "#include <fcntl.h>").  However, the SDK for this does not have a file named fcntl.h.  In order for this include to work I have to add another include directory, "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include".  This causes the compile to work, but the linker gives me the following errors:

    1>zlib.lib(deflate.obj) : error LNK2019: unresolved external symbol __iob_func referenced in function deflate_stored
    1>zlib.lib(zutil.obj) : error LNK2001: unresolved external symbol __iob_func
    1>zlib.lib(trees.obj) : error LNK2001: unresolved external symbol __iob_func

    After further inspection, I can see that the file msvcrt.lib (in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\lib\armv4i\msvcrt.lib) does not have any symbols for '__iob_func' (using dumpbin utility).

    Now,  if I look into the file msvcrt.lib (in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib) it does have the definitions for "__iob_func".

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib>dumpbin msvcrt.lib /all
    
    ...
      Version      : 0
      Machine      : 14C (x86)
      TimeDateStamp: 4DACE4C6 Mon Apr 18 20:26:30 2011
      SizeOfData   : 00000018
      DLL name     : MSVCR90.dll
      Symbol name  : ___iob_func
      Type         : code
      Name type    : no prefix
      Hint         : 161
      Name         : __iob_func
    
    ...

    Why is it that the ARMv4i msvcrt.lib is missing these and why is it that WEC7 SDK does not have fcntl.h?

    Tuesday, June 23, 2015 7:24 PM

All replies

  • Hello Kzawada,

    Please reach out to the company that provided you the SDK and confirm that they expect to have common runtime support on their device.  Note that the correct sysgens that need to be in place are documented on MSDN at https://msdn.microsoft.com/en-us/library/gg155191.aspx.

    If you create and SDK for a device without these sysgens set, you will not have support for the C Runtime.

    Sincerely,

    IoTGirl

    Tuesday, June 23, 2015 8:04 PM
    Moderator
  • Hi,

     I guess, you are using custom SDK, but not pre-installed like WinMobile or similar.

    So,  there is a easy way to check required headers - search file into wince700\public.
    For WEC7 it occurs only @ ceddk\test and contains constants declaration only. Also, you can search inclusion of "__iob_func" within *.LIB files @ wince700\public and make sure that there isn't such libs except

    Meanwhile, WEC2013 includes full fcntl.h and appropriate mention @ *.LIB files.

    Please note, that WEC2013 and WEC7 are not compatible and you can't use SDK for WEC2013 to build WEC7 appl and vice versa.

    Why? Because it's "compact" :(

    Wednesday, June 24, 2015 9:49 AM
  • Hi iShust,

    Just a few points to further validate your statements:

    • There is no Standard SDK for Windows Embedded Compact 7.0 so all platforms targeting CE 7 are using a custom SDK.  This means you need to contact the company that provided the SDK if you feel there is content missing.
    • if you are only doing Application Development, you likely do not have a \Wince700\ folder as this only comes with Platform Builder installs and not just VS 2008 with an SDK.
    • Windows Embedded Compact 2013 uses the new desktop compilers so was completely retooled to support the Desktop ABI and that broke binary compatibility but source code should compile for either with only minor changes.  As you noted, this is not the first such break, CE 5 to CE 6 had a memory model change that also broke binary compatibility but not fully like the ABI & Compiler change in Compact 2013.

    Sincerely,

    IoTGirl

    Wednesday, June 24, 2015 4:34 PM
    Moderator