This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TM4C1290NCPDT: Google Test Framework C++ over TI compiler v5.1.8

Part Number: TM4C1290NCPDT

Tool/software: TI C/C++ Compiler

I am trying to integrate google Test framework C++ into the project with compiler version "TI v5.1.8" and I am getting error cannot open source file "sys/types.h". I was successful with compiler "GNU v4.7.4" but our requirement is to compile over "TI v 5.1.8", clearly this points to restricted functionality of compiler "TI v5.1.8". All kind of ideas and experiments will be deeply appreciated. 

  • The header file "sys/types.h" is not required by the ANSI standard for C.  It is a header file related to the operating system.  It is supplied with GCC, but not TI compilers.

    Thanks and regards,

    -George

  • Thank you so much George for the reply. Now the question is "Is there any alternate way to tackle this problem as I am forced to use a TI compiler and Google test framework is a recommended Unit testing framework from my department"?

    Thanks and regards,
    Abdul Basit Noor Malik
  • If the Google test framework has a mode where it limits its tests to strictly conforming C and/or C++ programs, use that mode. If not, it is operating in a mode that the TI compiler does not support, and you should ask the test developers to help you with configuring such a mode.

    If you want to try it yourself, go in the to the compiler's include directory, create a new subdirectory sys, and create a blank file named types.h in that directory. You will get past the error about missing that file, but you will get new errors at each test site as they try to use features that are supposed to be provided in sys/types.h. You'll need to evaluate each one to figure out how to disable it when testing the TI compiler. Again, this is not directly supported by TI; if you have trouble with this, you'll need to ask the test developers.