Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 3, 2022 02:03 pm GMT

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 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!!


Original Link: https://dev.to/undeadindustries/vscode-and-wxwidgets-3c4i

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To