rapierorg / telegram-bot-swift

Telegram Bot SDK for Swift (unofficial)
https://github.com/rapierorg/telegram-bot-swift/wiki
Apache License 2.0
375 stars 63 forks source link

swift build error in linux #108

Closed hdcola closed 4 years ago

hdcola commented 4 years ago

swift --version Swift version 5.2.4 (swift-5.2.4-RELEASE) Target: x86_64-unknown-linux-gnu

os: Ubuntu 20.04

` swift build

:1:10: note: in file included from :1: #include "shim.h" ^ /home/hd/CityHelper/cityhelper/.build/checkouts/telegram-bot-swift/Sources/CCurl/include/shim.h:4:9: error: 'curl/curl.h' file not found #import ^ /home/hd/CityHelper/cityhelper/.build/checkouts/telegram-bot-swift/Sources/TelegramBotSDK/DataTaskError.swift:15:8: error: could not build C module 'CCurl' import CCurl ^ Can't demangle: $s14TelegramBotSDK13DataTaskErrorO07libcurlF033_70144438D05B5196FDA2910C4A5E3636LLXeF4codeL_Xevg Stack dump: 0. Program arguments: /usr/local/bin/swift -frontend -c -primary-file ... 1. Swift version 5.2.4 (swift-5.2.4-RELEASE) 2. While walking into decl 'DataTaskError' (at /home/hd/CityHelper/cityhelper/.build/checkouts/telegram-bot-swift/Sources/TelegramBotSDK/DataTaskError.swift:18:8) `
cipi1965 commented 4 years ago

On Ubuntu you must install libcurl4-openssl-dev from apt

hdcola commented 4 years ago

I just looked at the documentation and did write that it requires libcurl4-openssl-dev, thanks for the tip :)