Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cpp property per platform #73

Merged
merged 6 commits into from Jul 16, 2019
Merged

Conversation

seanyen
Copy link

@seanyen seanyen commented Jul 12, 2019

On Windows, the cpp property should be using the following settings:

"name": "Windows",
"intelliSenseMode": "msvc-x64",

Also, we should not add /usr/include when it is Windows.
(This fix should be able to address part of #72.)

@seanyen seanyen requested a review from kejxu July 12, 2019 18:21
@kejxu
Copy link

kejxu commented Jul 12, 2019

let's wait until #74 gets merged into mainline

@kejxu kejxu mentioned this pull request Jul 12, 2019
@kejxu
Copy link

kejxu commented Jul 12, 2019

I think a better solution would be to leverage api exposed from vscode-cpptools for c++ language configuration; however, that is likely going to take time. Let's stay simple for this change, and I will open a to-do ticket for that.

@Brabalawuka
Copy link

On Windows, the cpp property should be using the following settings:

"name": "Windows",
"intelliSenseMode": "msvc-x64",

Also, we should not add /usr/include when it is Windows.
(This fix should be able to address part of #72.)

I am still getting intellisense error after updating the preperties json file

include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\test\src\helloworld\src\listener.cpp). cannot open source file "boost/math/special_functions/round.hpp" (dependency of "ros/ros.h")

My json file is like:

{
"configurations": [
    {
        "browse": {
            "databaseFilename": "",
            "limitSymbolsToIncludedHeaders": true
        },
        "includePath": [
            "C:/opt/ros/melodic/x64\\include",
            "C:/opt/rosdeps/x64\\include",
            "${workspaceFolder}/**"
        ],
        "name": "Windows",
        "intelliSenseMode": "msvc-x64",
        "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.22.27812/bin/Hostx64/x64/cl.exe",
        "windowsSdkVersion": "10.0.18362.0",
        "cStandard": "c11",
        "cppStandard": "c++17"
    }
],
"version": 4

}

@kejxu
Copy link

kejxu commented Jul 15, 2019

I am still getting intellisense error after updating the preperties json file

thanks for sharing! could you try "C:/opt/rosdeps/x64\\include\\**"?

@Brabalawuka
Copy link

On Windows, the cpp property should be using the following settings:

"name": "Windows",
"intelliSenseMode": "msvc-x64",

Also, we should not add /usr/include when it is Windows.
(This fix should be able to address part of #72.)

I am still getting intellisense error after updating the preperties json file
include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\test\src\helloworld\src\listener.cpp). cannot open source file "boost/math/special_functions/round.hpp" (dependency of "ros/ros.h")
My json file is like:

{
"configurations": [
    {
        "browse": {
            "databaseFilename": "",
            "limitSymbolsToIncludedHeaders": true
        },
        "includePath": [
            "C:/opt/ros/melodic/x64\\include",
            "C:/opt/rosdeps/x64\\include",
            "${workspaceFolder}/**"
        ],
        "name": "Windows",
        "intelliSenseMode": "msvc-x64",
        "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.22.27812/bin/Hostx64/x64/cl.exe",
        "windowsSdkVersion": "10.0.18362.0",
        "cStandard": "c11",
        "cppStandard": "c++17"
    }
],
"version": 4

}

thanks for sharing! could you try "C:/opt/rosdeps/x64\\include\\**"?

Thanks for your help! The previos error has gone but onw it becomes

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\test\src\helloworld\src\listener.cpp). cannot open source file "sys/time.h" (dependency of "ros/ros.h")

Does that mean I hav anything that is not installed? I installed C++ envrionment in Visual studio so it should be Ok right?

@kejxu
Copy link

kejxu commented Jul 16, 2019

Thanks for your help! The previos error has gone but onw it becomes

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\test\src\helloworld\src\listener.cpp). cannot open source file "sys/time.h" (dependency of "ros/ros.h")

Does that mean I hav anything that is not installed? I installed C++ envrionment in Visual studio so it should be Ok right?

Thanks for reporting this!

This sounds similar to ros/roscpp_core#108. sys/time.h is a Linux-only library, thus generating this error on Windows. This error could be ignored if IntelliSense works for data types that your code base consumes =)

@kejxu kejxu added this to In progress in Enhancements Jul 16, 2019
@kejxu kejxu merged commit 30cc2de into ms-iot:master Jul 16, 2019
@kejxu kejxu deleted the cpp_property_fix branch July 16, 2019 01:15
@kejxu kejxu moved this from In progress to Done in Enhancements Jul 16, 2019
@Brabalawuka
Copy link

Brabalawuka commented Jul 16, 2019

Thanks for your help! The previos error has gone but onw it becomes
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\test\src\helloworld\src\listener.cpp). cannot open source file "sys/time.h" (dependency of "ros/ros.h")
Does that mean I hav anything that is not installed? I installed C++ envrionment in Visual studio so it should be Ok right?

Thanks for reporting this!

This sounds similar to ros/roscpp_core#108. sys/time.h is a Linux-only library, thus generating this error on Windows. This error could be ignored if IntelliSense works for data types that your code base consumes =)

Thanks a lot! SO I would just ognore it sinces it compiles Ok. !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Enhancements
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants