file not found

I’ve been trying to learn C++ and I started to learn about GUIs, but I’ve encountered some problems.
I am using wxWidgets 3.2.5, downloaded it by source on the official website but I can’t get It to work – whenever I try to run the example you can download on GitHub (https://github.com/lszl84/wx_cmake_template/tree/master) It says 'wx/wxprec.h' file not found.

You can correct the error by including the complete path to the #include, but the nested #include in the .h files will now give you file not found (ex. I corrected 'wx/wx.h' to /Users/alessandrodoro/wx_cmake_template/wxWidgets-3.2.5/include/wx/wx.h" , but inside wx.h there are ~81 #include 'wx/...' and every single one of them gives me error).

I tried including the workspace to path in C/C++ configurations as ${workspaceFolder}/src/**

/Users/alessandrodoro/wx_cmake_template/wxWidgets-3.2.5/include/wx/**

But it does not seem to change anything.

I’m using Mac Ventura 13.4.1 (M1) with VSCode

My main.cpp file is:

// wxWidgets "Hello world" Program
// For compilers that support precompilation, includes "wx/wx.h".
//#include <wx/wxprec.h>
#include "/Users/alessandrodoro/wx_cmake_template/wxWidgets-3.2.5/include/wx/wxprec.h"
#ifndef WX_PRECOMP
//#include <wx/wx.h>
#include "/Users/alessandrodoro/wx_cmake_template/wxWidgets-3.2.5/include/wx/wx.h"
#endif
class MyApp : public wxApp
{
public:
    virtual bool OnInit();
};
class MyFrame : public wxFrame
{
public:
    MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size);

private:
    void OnHello(wxCommandEvent &event);
    void OnExit(wxCommandEvent &event);
    void OnAbout(wxCommandEvent &event);
    wxDECLARE_EVENT_TABLE();
};
enum
{
    ID_Hello = 1
};
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
    EVT_MENU(ID_Hello, MyFrame::OnHello)
        EVT_MENU(wxID_EXIT, MyFrame::OnExit)
            EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
                wxEND_EVENT_TABLE()
                    wxIMPLEMENT_APP(MyApp);
bool MyApp::OnInit()
{
    MyFrame *frame = new MyFrame("Hello World", wxPoint(50, 50), wxSize(450, 340));
    frame->Show(true);
    return true;
}
MyFrame::MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size)
    : wxFrame(NULL, wxID_ANY, title, pos, size)
{
    wxMenu *menuFile = new wxMenu;
    menuFile->Append(ID_Hello, "&Hello...tCtrl-H",
                     "Help string shown in status bar for this menu item");
    menuFile->AppendSeparator();
    menuFile->Append(wxID_EXIT);
    wxMenu *menuHelp = new wxMenu;
    menuHelp->Append(wxID_ABOUT);
    wxMenuBar *menuBar = new wxMenuBar;
    menuBar->Append(menuFile, "&File");
    menuBar->Append(menuHelp, "&Help");
    SetMenuBar(menuBar);
    CreateStatusBar();
    SetStatusText("Welcome to wxWidgets!");
}
void MyFrame::OnExit(wxCommandEvent &event)
{
    Close(true);
}
void MyFrame::OnAbout(wxCommandEvent &event)
{
    wxMessageBox("This is a wxWidgets' Hello world sample",
                 "About Hello World", wxOK | wxICON_INFORMATION);
}
void MyFrame::OnHello(wxCommandEvent &event)
{
    wxLogMessage("Hello world from wxWidgets, ginger!");
}

My c_cpp_properties.json reads:

{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/src/**",
                "/Users/alessandrodoro/wx_cmake_template/wxWidgets-3.2.5/include/wx/**"
            ],
            "defines": [
                "__WXOSX_COCOA__",
                "__WXMAC__",
                "__WXOSX__"
            ],
            "macFrameworkPath": [],
            "compilerPath": "/usr/bin/clang++",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        },
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/src/**",
                "${workspaceFolder}/build/stage/include/**"
            ],
            "defines": [
                "__WXMSW__",
                "_UNICODE",
                "_DEBUG"
            ],
            "compilerPath": "cl.exe",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "msvc-x64"
        },
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/src/**",
                "${workspaceFolder}/build/stage/include/wx-3.1/**",
                "${workspaceFolder}/build/subprojects/Build/wxWidgets_external/lib/wx/include/gtk3-unicode-static-3.1/**"
            ],
            "defines": [
                "__WXGTK__"
            ],
            "compilerPath": "g++",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "gcc-x64"
        }
    ],
    "version": 4
}

The launch.json is

{
    "version": "0.2.0",
    "configurations": [
        
        {
            "name": "(lldb-mac) Launch",
            "type": "lldb",
            "request": "launch",
            "program": "${workspaceFolder}/build/subprojects/Build/wx_cmake_template_core/main.app",
            "cwd": "${workspaceFolder}",
            "preLaunchTask": "Build with CMake"
        },
        {
            "name": "(lldb-linux) Launch",
            "type": "lldb",
            "request": "launch",
            "program": "${workspaceFolder}/build/subprojects/Build/wx_cmake_template_core/main",
            "cwd": "${workspaceFolder}",
            "preLaunchTask": "Build with CMake"
        },
        {
            "name": "(msvc) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "${workspaceFolder}\build\subprojects\Build\wx_cmake_template_core\Debug\main.exe",
            "cwd": "${workspaceFolder}",
            "preLaunchTask": "Build with CMake"
        }
    ]
}

I saw an answer that said to try g++ `wx-config --cxxflags` -o out *.cpp `wx-config --libs` but it generates this error:

tempCodeRunnerFile.cpp:2:2: error: unterminated conditional directive

#ifndef WX_PRECOMP

I am new to C++ and have little to no idea of what I’m doing – I tried following all the tutorials available to my situation but with no success.
All the help is appreciated.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật