0

I modified the configurations of my C/C++ extension on VS Code. I'm trying to use wxWidgets on my Mac (M1 2020) with the normal x86 version of VS Code (C/C++ IntelliSense doesn't work on ARM). The folder I want to include is in my home folder.

Here's how my config file looks now:

{
"configurations": [
    {
        "name": "Mac",
        "includePath": [
            "${workspaceFolder}/**",
            "/Users/mario/wxWidgets/include"
        ],
        "defines": [],
        "macFrameworkPath": [
            "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
        ],
        "compilerPath": "/usr/bin/clang++",
        "cStandard": "c11",
        "cppStandard": "c++98",
        "intelliSenseMode": "macos-clang-arm64"
    }
],
"version": 4

}

Now, I get two errors in my include statement:

Update includePath

Unable to open error code "wx/setup.h" of the origin file (dependency of "wx/wx.h")

The IncludePath should contain everything that's needed for that include statement to work, so I have no idea why it's throwing an error. Can anyone help me? I'm pretty new to coding GUIs with external frameworks so I'm confused. Thanks :)

Mario
  • 13
  • 4
  • you are missing `build-specific` include folder. Open the Terminal, and execute `wx-config --cxxflags` and look at its output. – Igor Feb 08 '21 at 17:54
  • @Igor Apparently that command isn't in my PATH, where is it usually found so I can add that manually? – Mario Feb 08 '21 at 19:19
  • I presume you compile the library yourself and didn't run `make install`? That's OK. Just do `cd wxWidgets/ && ./wx-config --cxxflags`. Adjust the command accordingly. I usually have `~/wxWidgets` for current release and then `buildGTK` to directory where I ran configure. So in my case it will be `cd ~/wxWidgets/buildGTK && ./wx-config --cxxflags`. – Igor Feb 08 '21 at 20:42
  • Yes, I did in fact compile the library myself. I managed to run the command, but I get the same errors. Every time there's a new dependency that cannot be solved. This time it's `sys/types.h`. Your help is really appreciated – Mario Feb 08 '21 at 22:35
  • You might try the suggestions in [this answer](https://stackoverflow.com/a/57742056/2659307). If the problem persists, update your question to include the diagnostic information mentioned in that answer. – Scott McPeak Feb 12 '21 at 12:20

0 Answers0