[BUG] Error encountered during compilation for MacOS
kelinkong opened this issue · comments
An error occurred while compiling under MacOS
path: example/build
error:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:9:1: error:
expected unqualified-id
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
![image](https://private-user-images.githubusercontent.com/62141902/318460778-eb129ad5-121a-46d0-8b00-5f16e505f6d3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIwNjIxNDQsIm5iZiI6MTcyMjA2MTg0NCwicGF0aCI6Ii82MjE0MTkwMi8zMTg0NjA3NzgtZWIxMjlhZDUtMTIxYS00NmQwLThiMDAtNWYxNmU1MDVmNmQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI3VDA2MzA0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU1NGVjMTQ3OTAwMGUxZGQ2ZDk0Zjk3NWY1YmU0NWYwYWZlNjg1YWY1Y2FmOGI1Y2ZmODQzNmE1YWI1ODJjZDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.eOxDlMtGZi5T2FXIFjp2RzIorlMOPd7n7UHoVqYg04s)
Referenced Workflow file, there is no problem compiling as a library file, but when entering the example/build/
compilation GUI, there is an issue of Objective-C and C++ incompatibility.
If the demo is yours, when calling a C++ library, you need to change the .m file to .mm file.