lszl84 / wx_cmake_template

A template for multiplatform WxWidgets projects using CMake
MIT License
143 stars 50 forks source link

Not worked on MacOS with CLion CMake #1

Open avkluchko opened 3 years ago

avkluchko commented 3 years ago

When I try build on MacOS (after update, v11.2), I get error:

[ 6%] Performing download step (git clone) for 'wxWidgets_external' Cloning into 'wxWidgets_external'... remote: Enumerating objects: 243, done.
remote: Counting objects: 100% (243/243), done.
remote: Compressing objects: 100% (152/152), done.
remote: Total 824844 (delta 128), reused 162 (delta 90), pack-reused 824601
Receiving objects: 100% (824844/824844), 325.57 MiB | 613.00 KiB/s, done. Resolving deltas: 100% (687446/687446), done. Already on 'master' Your branch is up to date with 'origin/master'. Submodule '3rdparty/catch' (https://github.com/wxWidgets/Catch.git) registered for path '3rdparty/catch' Submodule 'src/expat' (https://github.com/wxWidgets/libexpat.git) registered for path 'src/expat' Submodule 'src/jpeg' (https://github.com/wxWidgets/libjpeg-turbo.git) registered for path 'src/jpeg' Submodule 'src/png' (https://github.com/wxWidgets/libpng.git) registered for path 'src/png' Submodule 'src/tiff' (https://github.com/wxWidgets/libtiff.git) registered for path 'src/tiff' Submodule 'src/zlib' (https://github.com/wxWidgets/zlib.git) registered for path 'src/zlib' Cloning into '/Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/3rdparty/catch'... Cloning into '/Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/expat'... Cloning into '/Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/jpeg'... Cloning into '/Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/png'... Cloning into '/Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/tiff'... Cloning into '/Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/zlib'... Submodule path '3rdparty/catch': checked out 'ee4acb6ae6e32a02bc012d197aa82b1ca7a493ab' Submodule path 'src/expat': checked out 'adaa0c379b92fb962db0dd8363c1e4e2d4e7a060' Submodule path 'src/jpeg': checked out '852493611506076fd9ad931d35bf1c3cc5b5a9c3' Submodule path 'src/png': checked out '9853c67ab43053b1bbe05edde3dc12854d48b158' Submodule path 'src/tiff': checked out '28ce1ef089a099334920a2d12698fa6354e30247' Submodule path 'src/zlib': checked out '5888671274cde770edbe683b435f052de2b03681' [ 12%] No patch step for 'wxWidgets_external' [ 18%] No update step for 'wxWidgets_external' [ 25%] Performing configure step for 'wxWidgets_external' -- wxWidgets_external configure command succeeded. See also /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Stamp/wxWidgets_external/wxWidgets_external-configure-*.log [ 31%] Performing build step for 'wxWidgets_external' CMake Error at /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Stamp/wxWidgets_external/wxWidgets_external-build-Debug.cmake:49 (message): Command failed: 2

'/Applications/Xcode.app/Contents/Developer/usr/bin/make'

See also

/Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Stamp/wxWidgets_external/wxWidgets_external-build-*.log

make[3]: [subprojects/Stamp/wxWidgets_external/wxWidgets_external-build] Error 1 make[2]: [thirdparty/wxwidgets/CMakeFiles/wxWidgets_external.dir/all] Error 2 make[1]: [CMakeFiles/wx_cmake_template_core.dir/rule] Error 2 make: [wx_cmake_template_core] Error 2

avkluchko commented 3 years ago

I really liked the idea, but now I need to run it on a macos as well

avkluchko commented 3 years ago

I tried cmake --build build in console and it worked. But not worked when I run build in CLion

lszl84 commented 3 years ago

I'm not really familliar with CLion, maybe they change the environment and it messes with the build? Please attach '/Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Stamp/wxWidgets_external/wxWidgets_external-build-*.log' files and maybe we can figure something out.

Glad it works in "raw" cmake, without CLion.

avkluchko commented 3 years ago

wxWidgets_external-build-err.log

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(arm_init.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(filter_neon_intrinsics.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(palette_neon_intrinsics.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(filter_msa_intrinsics.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(mips_init.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(filter_vsx_intrinsics.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(powerpc_init.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(arm_init.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(filter_neon_intrinsics.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(palette_neon_intrinsics.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(filter_msa_intrinsics.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(mips_init.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(filter_vsx_intrinsics.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxpng-3.1.a(powerpc_init.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_fax3.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_jbig.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_jpeg.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_jpeg_12.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_lzma.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_ojpeg.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_webp.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_zip.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_zstd.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_fax3.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_jbig.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_jpeg.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_jpeg_12.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_lzma.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_ojpeg.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_webp.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_zip.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libwxtiff-3.1.a(tif_zstd.c.o) has no symbols In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:21, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/core/private.h:46, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/private.h:4, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/common/filefn.cpp:52: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:391:15: error: expected unqualified-id before '^' token 391 | typedef void (^CGPathApplyBlock)(const CGPathElement element); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:391:15: error: expected ')' before '^' token 391 | typedef void (^CGPathApplyBlock)(const CGPathElement element); | ~^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:393:53: error: 'CGPathApplyBlock' has not been declared 393 | CG_EXTERN void CGPathApplyWithBlock(CGPathRef path, CGPathApplyBlock CF_NOESCAPE block) | ^~~~ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:14, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:15, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:16, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:23, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/core/private.h:46, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/private.h:4, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/common/filefn.cpp:52: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:103:15: error: expected unqualified-id before '^' token 103 | typedef bool (^CGPDFArrayApplierBlock)(size_t index, | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:103:15: error: expected ')' before '^' token 103 | typedef bool (^CGPDFArrayApplierBlock)(size_t index, | ~^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:113:5: error: 'CGPDFArrayApplierBlock' has not been declared 113 | CGPDFArrayApplierBlock cg_nullable block, void __nullable info) | ^~~~~~ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:15, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:16, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:23, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/core/private.h:46, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/private.h:4, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/common/filefn.cpp:52: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:116:15: error: expected unqualified-id before '^' token 116 | typedef bool (^CGPDFDictionaryApplierBlock)(const char key, | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:116:15: error: expected ')' before '^' token 116 | typedef bool (^CGPDFDictionaryApplierBlock)(const char key, | ~^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:126:5: error: 'CGPDFDictionaryApplierBlock' has not been declared 126 | CGPDFDictionaryApplierBlock cg_nullable block, void nullable info) | ^~~~~~~ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:23, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:39, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/core/private.h:46, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/private.h:4, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/common/filefn.cpp:52: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h:379:27: error: expected ')' before '^' token 379 | bool (^ _Nullable registrationHandler)(CFArrayRef errors, bool done) ) CT_AVAILABLE(ios(13.0)) API_UNAVAILABLE(macos, watchos, tvos); | ~^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h:379:27: error: expected ')' before '^' token 379 | bool (^ _Nullable registrationHandler)(CFArrayRef errors, bool done) ) CT_AVAILABLE(ios(13.0)) API_UNAVAILABLE(macos, watchos, tvos); | ^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h:374:46: note: to match this '(' 374 | void CTFontManagerRegisterFontsWithAssetNames( | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h:379:27: error: expected initializer before '^' token 379 | bool (^ _Nullable registrationHandler)(CFArrayRef errors, bool done) ) CT_AVAILABLE(ios(13.0)) API_UNAVAILABLE(macos, watchos, tvos); | ^ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ImageIO.framework/Headers/ImageIO.h:20, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:47, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/core/private.h:46, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/private.h:4, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/common/filefn.cpp:52: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:42:15: error: expected unqualified-id before '^' token 42 | typedef void (^CGImageSourceAnimationBlock)(size_t index, CGImageRef image, bool stop); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:42:15: error: expected ')' before '^' token 42 | typedef void (^CGImageSourceAnimationBlock)(size_t index, CGImageRef image, bool stop); | ~^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:50:107: error: 'CGImageSourceAnimationBlock' has not been declared 50 | IMAGEIO_EXTERN OSStatus CGAnimateImageAtURLWithBlock(CFURLRef url, CFDictionaryRef _iio_Nullable options, CGImageSourceAnimationBlock block) IMAGEIO_AVAILABLE_STARTING(10.15, 13.0); | ^~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:58:108: error: 'CGImageSourceAnimationBlock' has not been declared 58 | IMAGEIO_EXTERN OSStatus CGAnimateImageDataWithBlock(CFDataRef data, CFDictionaryRef _iio_Nullable options, CGImageSourceAnimationBlock block) IMAGEIO_AVAILABLE_STARTING(10.15, 13.0); | ^~~~~~~ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:21, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/core/private.h:46, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/private.h:4, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/common/filename.cpp:107: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:391:15: error: expected unqualified-id before '^' token 391 | typedef void (^CGPathApplyBlock)(const CGPathElement element); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:391:15: error: expected ')' before '^' token 391 | typedef void (^CGPathApplyBlock)(const CGPathElement element); | ~^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:393:53: error: 'CGPathApplyBlock' has not been declared 393 | CG_EXTERN void CGPathApplyWithBlock(CGPathRef path, CGPathApplyBlock CF_NOESCAPE block) | ^~~~ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:14, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:15, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:16, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:23, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/core/private.h:46, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/private.h:4, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/common/filename.cpp:107: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:103:15: error: expected unqualified-id before '^' token 103 | typedef bool (^CGPDFArrayApplierBlock)(size_t index, | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:103:15: error: expected ')' before '^' token 103 | typedef bool (^CGPDFArrayApplierBlock)(size_t index, | ~^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:113:5: error: 'CGPDFArrayApplierBlock' has not been declared 113 | CGPDFArrayApplierBlock cg_nullable block, void * nullable info) | ^~~~~~ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:15, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:16, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:23, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/core/private.h:46, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/private.h:4, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/common/filename.cpp:107: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:116:15: error: expected unqualified-id before '^' token 116 | typedef bool (^CGPDFDictionaryApplierBlock)(const char key, | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:116:15: error: expected ')' before '^' token 116 | typedef bool (^CGPDFDictionaryApplierBlock)(const char key, | ~^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:126:5: error: 'CGPDFDictionaryApplierBlock' has not been declared 126 | CGPDFDictionaryApplierBlock cg_nullable block, void __nullable info) | ^~~~~~~ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:23, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:39, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/core/private.h:46, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/private.h:4, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/common/filename.cpp:107: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h:379:27: error: expected ')' before '^' token 379 | bool (^ _Nullable registrationHandler)(CFArrayRef errors, bool done) ) CT_AVAILABLE(ios(13.0)) API_UNAVAILABLE(macos, watchos, tvos); | ~^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h:379:27: error: expected ')' before '^' token 379 | bool (^ _Nullable registrationHandler)(CFArrayRef errors, bool done) ) CT_AVAILABLE(ios(13.0)) API_UNAVAILABLE(macos, watchos, tvos); | ^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h:374:46: note: to match this '(' 374 | void CTFontManagerRegisterFontsWithAssetNames( | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h:379:27: error: expected initializer before '^' token 379 | bool (^ _Nullable registrationHandler)(CFArrayRef errors, bool done) ) CT_AVAILABLE(ios(13.0)) API_UNAVAILABLE(macos, watchos, tvos); | ^ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ImageIO.framework/Headers/ImageIO.h:20, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:47, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/core/private.h:46, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/include/wx/osx/private.h:4, from /Users/username/projects/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/common/filename.cpp:107: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:42:15: error: expected unqualified-id before '^' token 42 | typedef void (^CGImageSourceAnimationBlock)(size_t index, CGImageRef image, bool stop); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:42:15: error: expected ')' before '^' token 42 | typedef void (^CGImageSourceAnimationBlock)(size_t index, CGImageRef image, bool* stop); | ~^ | ) /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:50:107: error: 'CGImageSourceAnimationBlock' has not been declared 50 | IMAGEIO_EXTERN OSStatus CGAnimateImageAtURLWithBlock(CFURLRef url, CFDictionaryRef _iio_Nullable options, CGImageSourceAnimationBlock block) IMAGEIO_AVAILABLE_STARTING(10.15, 13.0); | ^~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:58:108: error: 'CGImageSourceAnimationBlock' has not been declared 58 | IMAGEIO_EXTERN OSStatus CGAnimateImageDataWithBlock(CFDataRef data, CFDictionaryRef _iio_Nullable options, CGImageSourceAnimationBlock block) IMAGEIO_AVAILABLE_STARTING(10.15, 13.0); | ^~~~~~~ make[6]: [libs/base/CMakeFiles/wxbase.dir/////src/common/filefn.cpp.o] Error 1 make[6]: Waiting for unfinished jobs.... make[6]: [libs/base/CMakeFiles/wxbase.dir/////src/common/filename.cpp.o] Error 1 make[5]: [libs/base/CMakeFiles/wxbase.dir/all] Error 2 make[5]: Waiting for unfinished jobs.... make[4]: [all] Error 2

pauljsymonds commented 1 year ago

I am getting similar issue in clion

====================[ Build | wx_cmake_template_core | Debug ]================== "/Users/user-xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/CLion.app/Contents/bin/cmake/mac/bin/cmake" --build /Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug --target wx_cmake_template_core -j 6 [2/16] Performing download step (git clone) for 'wxWidgets_external' Cloning into 'wxWidgets_external'... HEAD is now at 6cdaedd42b Fill in the binaries SHA-1 checksums Submodule '3rdparty/catch' (https://github.com/wxWidgets/Catch.git) registered for path '3rdparty/catch' Submodule 'src/expat' (https://github.com/wxWidgets/libexpat.git) registered for path 'src/expat' Submodule 'src/jpeg' (https://github.com/wxWidgets/libjpeg-turbo.git) registered for path 'src/jpeg' Submodule 'src/png' (https://github.com/wxWidgets/libpng.git) registered for path 'src/png' Submodule 'src/tiff' (https://github.com/wxWidgets/libtiff.git) registered for path 'src/tiff' Submodule 'src/zlib' (https://github.com/wxWidgets/zlib.git) registered for path 'src/zlib' Cloning into '/Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/3rdparty/catch'... Cloning into '/Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/zlib'... Cloning into '/Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/jpeg'... Cloning into '/Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/expat'... Cloning into '/Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/png'... Cloning into '/Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/Source/wxWidgets_external/src/tiff'... Submodule path '3rdparty/catch': checked out 'ee4acb6ae6e32a02bc012d197aa82b1ca7a493ab' Submodule path 'src/expat': checked out '7532d85708929ebdb148308ca998268d3aaf3527' Submodule path 'src/jpeg': checked out '852493611506076fd9ad931d35bf1c3cc5b5a9c3' Submodule path 'src/png': checked out '3ffeff7877598d3236cc09a6d3f478073eb33f35' Submodule path 'src/tiff': checked out '9f657ff8a7411c95ffe83ec39e3e881c3fec6bb0' Submodule path 'src/zlib': checked out '5888671274cde770edbe683b435f052de2b03681' [13/16] Performing configure step for 'wx_cmake_template_core' FAILED: subprojects/Stamp/wx_cmake_template_core/wx_cmake_template_core-configure /Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/Stamp/wx_cmake_template_core/wx_cmake_template_core-configure cd /Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/Build/wx_cmake_template_core && "/Users/user-xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/CLion.app/Contents/bin/cmake/mac/bin/cmake" -DCMAKE_BUILD_TYPE=Debug -DwxWidgets_ROOT_DIR=/Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/stage -DENV_WX_CONFIG=/Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/stage/bin/wx-config -GNinja -C/Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/tmp/wx_cmake_template_core/wx_cmake_template_core-cache-Debug.cmake /Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/src && "/Users/user-xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/CLion.app/Contents/bin/cmake/mac/bin/cmake" -E touch /Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/Stamp/wx_cmake_template_core/wx_cmake_template_core-configure loading initial cache file /Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/tmp/wx_cmake_template_core/wx_cmake_template_core-cache-Debug.cmake -- The CXX compiler identification is AppleClang 14.0.0.14000029 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at /Users/user-xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/CLion.app/Contents/bin/cmake/mac/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS) Call Stack (most recent call first): /Users/user-xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/CLion.app/Contents/bin/cmake/mac/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /Users/user-xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/CLion.app/Contents/bin/cmake/mac/share/cmake-3.24/Modules/FindwxWidgets.cmake:977 (find_package_handle_standard_args) CMakeLists.txt:15 (find_package)

-- Configuring incomplete, errors occurred! See also "/Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/Build/wx_cmake_template_core/CMakeFiles/CMakeOutput.log". See also "/Users/user-xyz/Documents/Documents/Programming/c++/wx_cmake_template/cmake-build-debug/subprojects/Build/wx_cmake_template_core/CMakeFiles/CMakeError.log". ninja: build stopped: subcommand failed.

pauljsymonds commented 1 year ago

To resolve the issue, I used brew to install latest cmake and pointed CLion ToolChain for CMake to that.

I also used the latest wxWidgets and modified the version in the CMakeLists.txt.

This then compiled fine.