0

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]

enter image description here

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
Debabrata Mondal
  • 101
  • 4
  • 12

1 Answers1

0

You should choose command line tool version, Xcode ▶ Preferences ▶ Location ▶ Command Line Tool ▶ then choose appropriate command line tool version.

babacan
  • 9
  • 5