Problem using wx headers in XCode

15 views
Skip to first unread message

Tim Burgess

unread,
Jan 14, 2026, 6:16:38 AM (19 hours ago) Jan 14
to wx-u...@googlegroups.com

Hi,

 

I’m revisiting this topic, as I still haven’t achieved a resolution.

 

I have wxWidgets installed and built via VCPKG on my Mac Taho computer, with the headers resident in:

 

~/vcpkg/installed/x64-osx/include

 

I have other libraries, such as Boost installed using the same path and triplet.

 

I am blind and Xcode’s Build Settings UI is horrendous to use with a screen reader, so I’ve been modifying my project’s settings (Base.xcconfig) file in a text editor. My header path is defined as:

 

SYSTEM_HEADER_SEARCH_PATHS = "$(HOME)/vcpkg/installed/x64-osx/include/**"

// HEADER_SEARCH_PATHS = "$(WXROOT)/src/tiff/libtiff"

// USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include" "$(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include" "$(WXROOT)/src/jpeg" "$(WXROOT)/src/png" "$(WXROOT)/src/regex" "$(WXROOT)/src/expat/lib" "$(WXROOT)/src/tiff/libtiff" "$(WXROOT)/src/stc/scintilla/src" "$(WXROOT)/src/stc/scintilla/include"

HEADER_SEARCH_PATHS = "$(HOME)/vcpkg/installed/x64-osx/include/**" $(HOME)/include $(HOME)/include/wx-$(DYLIB_COMPATIBILITY_VERSION) $(HOME)/lib/wx/include/osx_cocoa-unicode-3.1 /usr/include/libxml2

ALWAYS_SEARCH_USER_PATHS = NO

 

I have tried using the path with and without the quotes – the path contains no spaces, so they shouldn’t be necessary. My understanding is that adding ./** to the end of the path indicates that the path should be scanned recursively, which is what I want.

 

If I don’t specify the path pointing to my VCPKG installation, my build fails to find wx.h, which is what I expect. Adding this path reports no errors relating to wx.h, so I’m assuming that the file is now being found. However, the build fails with too many errors relating to WX types and methods not being defined, so I’m assuming that other headers are still not being found. Making these changes in the Base.xcconfig and getting differing results gives me confidence that I’m editing the correct settings file.

 

Can anybody offer me any advice, please?

 

Best wishes.

 

Tim

 

 

skywind MailingLists

unread,
Jan 14, 2026, 6:32:57 AM (19 hours ago) Jan 14
to wx-u...@googlegroups.com
Hi,

Are the wxWidgets’ headers within a folder „wxWidgets" inside "~/vcpkg/installed/x64-osx/include“? Anyway, it should not be the system header search path because it requires „<>“ brackets in the include statements. wxWidgets uses „“. So, you should either mention the path in the header or user header search paths.

Regards,
Hardy



-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-users+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wx-users/000a01dc8547%243d4c1200%24b7e43600%24%40raisedbar.net.

Maarten Bent

unread,
Jan 14, 2026, 6:38:16 AM (19 hours ago) Jan 14
to wx-u...@googlegroups.com
Hi Tim,

I can't help with Xcode specific variables, but wxWidgets needs two include paths. One for the headers, and one for setup.h.
If wx.h and other headers are found the headers seem to be included correctly.
setup.h is in the lib folder, and you already include $(HOME)/lib/wx/include/osx_cocoa-unicode-3.1
This is folder for wxWidgets 3.1. Are you using this version? The latest versions on vcpkg are 3.3 and 3.2 stable. Maybe you need to update this path to have the correct version?
And I'm not sure about this one, but you might need to include the path with setup.h before including the general wx headers.

Greetings,
Maarten
--

Tim Burgess

unread,
Jan 14, 2026, 7:23:25 AM (18 hours ago) Jan 14
to wx-users
Hi Hardy,

Yes, my WX headers are within the path I specified.

In the latest Xcode the system search path is tagged as deprecated anyhow, but not using it seems to bring back the wx.h error.

Cheers.

Tim


Tim Burgess

unread,
Jan 14, 2026, 7:26:08 AM (18 hours ago) Jan 14
to wx-users
OK, thanks.

I’ve now included a recursive path that *should* find setup.h, but still no joy.

I’ve just found an article that describes similar issues, though some time ago, that suggests that I define a custom build parameter, USE_HEADERMAP, with a value of NO, so now I have to try and figure out where I can set this without having to tackle the Xcode UI (sigh).

Thanks for the assist.

Tim


Reply all
Reply to author
Forward
0 new messages