VSCode and WxWidgets

I can’t seem to get VS Code to like WxWidgets on Linux or MacOS. It seems like it’s trying to default to MSW?

The specific question is making VSCode play nice (autocomplete, don’t give false errors) with WxWidgets. In command prompt, compiling any Wx …


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by undeadindustries

I can't seem to get VS Code to like WxWidgets on Linux or MacOS. It seems like it's trying to default to MSW?

The specific question is making VSCode play nice (autocomplete, don't give false errors) with WxWidgets. In command prompt, compiling any Wx project works perfect.

Steps:

  1. VS Code is installed
  2. Create folder for project. Let's call it /src/hello
  3. Create a hello.cpp file with code from: https://docs.wxwidgets.org/3.0/overview_helloworld.html
  4. Download WxWidgets into /src/hello/deps
  5. Going through steps to compile and install Wx https://docs.wxwidgets.org/trunk/plat_osx_install.html
  6. Check my Intellisense includes to include ${workspaceFolder}/**

Now, in the command prompt, if I run:
g++ hello.cpp 'wx-config --cxxflags --libs' -o hello
./hello runs perfect!

But in VSCode is unusable because it's giving me this error:
cannot open source file "../../../lib/vc_lib/msw/wx/setup.h" (dependency of "wx/wxprec.h")

I'm pretty sure msw is for windows?

I feel like I've tried everything:

  1. Downloaded and Git version of Wx (Yeah, I know it's the same. But people on the wx forums recommended trying...)
  2. Use the Homebrew WxWidgets install.
  3. Using the sample projects included with Wx.
  4. Using the Hello World
  5. Same issues in Linux and MacOS.
  6. Updating Intellisense's includes every way you can think of.
  7. Using the output of wxconfig and putting the cxxflags and lib include output into Intellisense.

Anyone able to test this all on their MacOS or Linux system and see if they are able to get VS Code to play nice?

THANK YOU!!


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by undeadindustries


Print Share Comment Cite Upload Translate Updates
APA

undeadindustries | Sciencx (2022-10-03T14:03:40+00:00) VSCode and WxWidgets. Retrieved from https://www.scien.cx/2022/10/03/vscode-and-wxwidgets/

MLA
" » VSCode and WxWidgets." undeadindustries | Sciencx - Monday October 3, 2022, https://www.scien.cx/2022/10/03/vscode-and-wxwidgets/
HARVARD
undeadindustries | Sciencx Monday October 3, 2022 » VSCode and WxWidgets., viewed ,<https://www.scien.cx/2022/10/03/vscode-and-wxwidgets/>
VANCOUVER
undeadindustries | Sciencx - » VSCode and WxWidgets. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/10/03/vscode-and-wxwidgets/
CHICAGO
" » VSCode and WxWidgets." undeadindustries | Sciencx - Accessed . https://www.scien.cx/2022/10/03/vscode-and-wxwidgets/
IEEE
" » VSCode and WxWidgets." undeadindustries | Sciencx [Online]. Available: https://www.scien.cx/2022/10/03/vscode-and-wxwidgets/. [Accessed: ]
rf:citation
» VSCode and WxWidgets | undeadindustries | Sciencx | https://www.scien.cx/2022/10/03/vscode-and-wxwidgets/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.