Closed EgorKolyshkin closed 4 years ago
Could you try:
cd Examples/hello-bot
swift build
Does it fail with the same error?
No, if i
git clone https://github.com/zmeyc/telegram-bot-swift
And then cd examples/hello-bot
and swift build
It works fine
Does it checkout the latest version? "0.0.0" could fetch very old one. Also I've ported the lib to Swift 4 (in dev branch, not tagged yet), so you may want to try that version instead. It's still work-in-progress, I plan to remove SwiftyJSON dependency then release it.
Oh, I changed the version to the last one, and it doesn't throw errors now. But after I added to main.swift
import TelegramBot
it says "no such module"
It's now called TelegramBotSDK.
@EgorKolyshkin did it work?
No, i added “TelegramBotSDK” to a target dependency, and after i run swift build, it throws Product Dependency ‘TelegramBotSDK’ not found
That's what I did:
swift package init --type executable
added a dependency in Package.swiftswift build
And it throws a hundreds of errors, like: /opt/local/include/curl/system.h:399:12: note: while building module 'Darwin' imported from /opt/local/include/curl/system.h:399: # include ^ :338:9: note: in file included from :338: #import "ncurses.h" ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/ncurses.h:141:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/ncurses.h:141: #include ^ /opt/local/include/unctrl.h:60:63: error: unknown type name 'SCREEN' NCURSES_EXPORT(NCURSES_CONST char ) NCURSES_SP_NAME(unctrl) (SCREEN, chtype); ^ /opt/local/include/curl/system.h:399:12: note: while building module 'Darwin' imported from /opt/local/include/curl/system.h:399: '#' include ^ ...
My Package.swift: