I am using Nvim to try and develop a Mac application. I have just imported AppKit.h to instantiate a sharedApplication
.
I am using coc-clangd
for autocompletion. I am getting the following error when I import AppKit.h.
In included file: function does not return NSString
[clang: format_attribute_result_not]
The code:
#include <stdio.h>
#include <AppKit/AppKit.h>
int main(int argc, const char * argv[])
{
printf("Hello world");
return 0;
}
I should also mention that the code is compiling just fine. I have tried the following compile commands and both of them have worked.
clang -framework AppKit -o a osx_main.mm
clang -Wall -o a osx_main.mm
You should choose command line tool version, Xcode ▶ Preferences ▶ Location ▶ Command Line Tool ▶ then choose appropriate command line tool version.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.