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.

CCS/CCSTUDIO: Trouble with windows.h and MinGW

Part Number: CCSTUDIO
Other Parts Discussed in Thread: CC2650

Tool/software: Code Composer Studio

Hello,

I'm using the CC2650 with CCS V7 and when I try to build my project I have this error : #1965 cannot open source file "windows.h"

So I added to the path "C:\MinGW\include" and now I have another problem :

"  Description Resource Path Location Type
   #20 identifier "__int64" is undefined .ccsproject /pinInterrupt_CC2650_LAUNCHXL_TI line 113, external location: C:\MinGW\include\basetsd.h C/C++ Problem
   #20 identifier "__int64" is undefined .ccsproject /pinInterrupt_CC2650_LAUNCHXL_TI line 114, external location: C:\MinGW\include\basetsd.h C/C++ Problem
   #35 #error directive: "undefined processor type" .ccsproject /pinInterrupt_CC2650_LAUNCHXL_TI line 2424, external location: C:\MinGW\include\winnt.h C/C++ Problem

"

I don't understand these issues.

If someone can help me.

Thanks

Tristan.

  • Hi Tristan,
    Your error messages are a bit confusing to me. Did you take the existing example pin interrupt project and make modifications to it? I see platform specific references (winnt, windows, etc). Did you try to add example code written for a windows host target?

    Thanks
    ki
  • Hi Ki-Soo Lee

    You are right, I didn't explain well the problem.

    So first, I took the existing example pin interrupt project and it worked. After that I did some modification to add the VL53L0 IR sensor. But the problem is, if I want to use this component, I have to use API. And in these API files there is an include : #include "winows.h".

    Then, when I add the path of the include (windows.h) I have these errors. I don't know how to resolve it ...

    I attach a picture to show you what is undefined and where is the problem. (blue lines)

    I was thinking that perhaps the issue comes from the GCC. It is possible ?

    Thank you for your help,

    Tristan.

  • Tristan delmarcq said:
    After that I did some modification to add the VL53L0 IR sensor. But the problem is, if I want to use this component, I have to use API. And in these API files there is an include : #include "winows.h".

    But what kind of modifications are you doing? Where are you getting this component? Unless you are using a different windows.h, that header file is a windows specific header file for calling windows APIs. That will not work in your target environment.

  • "what kind of modifications" well .. I'm adding lines to integrate the VL53L0 sensor, like initialization of the component, calibration, measurement ... This component comes from ST Microelectronics. I asked STM and they said that this component can be used with the cc2650.

    They sent me a folder with everything I need (API to integrate and a file.pdf to explain how proced) and there is no windows.h inside, so I guess I need the default library, ready to be used.

    When you say "That will not work in your target environment" are you talking about the CC2650 ? Why it would not work ?

    If you want to understand better I can't send a file.

    Tristan.
  • I tried to understand better the problem and I saw in other forum that this problem can be due to the PATH. So, I added the path (C:\MinGW\\bin), but it doesn't change anything and I have the same errors :

       "C:/MinGW/include/basetsd.h", line 113: error #20: identifier "__int64" is undefined
       "C:/MinGW/include/basetsd.h", line 114: error #20: identifier "__int64" is undefined
       "C:/MinGW/include/basetsd.h", line 115: error #66: expected a ";"

       "C:/MinGW/include/winnt.h", line 2424: fatal error #35: #error directive: "undefined processor type"

    I don't understand the last one, why I have this error ... What can be the origin ? How can I resolve it ?

    PS : I think the third error is due to the first two errors. There is a ";"

    Thank you for your help,

    Tristan.

  • Tristan delmarcq said:
    They sent me a folder with everything I need (API to integrate and a file.pdf to explain how proced) and there is no windows.h inside, so I guess I need the default library, ready to be used.

    When you say "That will not work in your target environment" are you talking about the CC2650 ? Why it would not work ?

    The example code for the VL53L0 comes with Windows platform-dependent code to use a I2C interface.

    To interface a VL53L0 to a CC2650 platform-dependent code must be written to use the I2C interface on a CC2650. See the Platform section in the VL53L0X API Specification for the API settings that are platform-dependent, and therefore must be adapted for use on a CC2650.