diff options
-rw-r--r-- | samples/receive-file/CMakeLists.txt | 4 | ||||
-rw-r--r-- | samples/receive-file/src/main.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/samples/receive-file/CMakeLists.txt b/samples/receive-file/CMakeLists.txt index 0031c89..6f86a9c 100644 --- a/samples/receive-file/CMakeLists.txt +++ b/samples/receive-file/CMakeLists.txt @@ -16,6 +16,6 @@ if (CURL_FOUND) add_definitions(-DHAVE_CURL) endif() -add_executable(file src/main.cpp) +add_executable(receive-file src/main.cpp) -target_link_libraries(file /usr/local/lib/libTgBot.a ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} ${Boost_LIBRARIES} ${CURL_LIBRARIES}) +target_link_libraries(receive-file /usr/local/lib/libTgBot.a ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} ${Boost_LIBRARIES} ${CURL_LIBRARIES}) diff --git a/samples/receive-file/src/main.cpp b/samples/receive-file/src/main.cpp index bbfaadf..7a0e8ff 100644 --- a/samples/receive-file/src/main.cpp +++ b/samples/receive-file/src/main.cpp @@ -21,7 +21,7 @@ int main() { printf("User wrote %s\n", message->text.c_str()); File::Ptr file = bot.getApi().getFile(message->document->fileId); - std::string fileContent = bot.getApi().downloadFile(file->filePath); + string fileContent = bot.getApi().downloadFile(file->filePath); if (StringTools::startsWith(message->text, "/start")) { return; |