Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. // swift-tools-version:5.0
  2. import PackageDescription
  3.  
  4. let package = Package(
  5. name: "NcursesExample",
  6. products: [
  7. .executable(name: "NcursesExample", targets: ["NcursesExample"]),
  8. ],
  9. dependencies: [
  10. ],
  11. targets: [
  12. .systemLibrary(name: "Cncurses"),
  13. .target(name: "NcursesExample", dependencies: ["Cncurses"]),
  14. ]
  15. )
  16.  
  17. module Cncurses {
  18. header "shim.h"
  19. link "ncurses"
  20. export *
  21. }
  22.  
  23. #include "/usr/local/Cellar/ncurses/6.1/include/ncurses.h"
  24.  
  25. shim.h:1:10: note: in file included from shim.h:1:
  26. #include "/usr/local/Cellar/ncurses/6.1/include/ncurses.h"
  27. ^
  28. /usr/local/Cellar/ncurses/6.1/include/ncurses.h:60:10: error: 'ncursesw/ncurses_dll.h' file not found with <angled> include; use "quotes" instead
  29. #include <ncursesw/ncurses_dll.h>
  30. ^
  31. <module-includes>:1:9: note: in file included from <module-includes>:1:
  32. #import "shim.h"
  33. ^
  34. shim.h:1:10: note: in file included from shim.h:1:
  35. #include "/usr/local/Cellar/ncurses/6.1/include/ncurses.h"
  36. ^
  37. /usr/local/Cellar/ncurses/6.1/include/ncurses.h:674:45: error: conflicting types for 'keyname'
  38. extern NCURSES_EXPORT(NCURSES_CONST char *) keyname (int); /* implemented */
  39. ^
  40. /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/curses.h:598:45: note: previous declaration is here
  41. extern NCURSES_EXPORT(NCURSES_CONST char *) keyname (int); /* implemented */
  42.  
  43. ...
  44.  
  45. ncurses is keg-only, which means it was not symlinked into /usr/local,
  46. because macOS already provides this software and installing another version in
  47. parallel can cause all kinds of trouble.
  48.  
  49. If you need to have ncurses first in your PATH run:
  50. echo 'export PATH="/usr/local/opt/ncurses/bin:$PATH"' >> ~/.zshrc
  51.  
  52. For compilers to find ncurses you may need to set:
  53. export LDFLAGS="-L/usr/local/opt/ncurses/lib"
  54. export CPPFLAGS="-I/usr/local/opt/ncurses/include"
  55.  
  56. For pkg-config to find ncurses you may need to set:
  57. export PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement