Installing FTP Client (Library) in C++ Ubuntu

  c++, cmake, ubuntu

I have found this library https://github.com/embeddedmz/ftpclient-cpp on GitHub but how to install it on Linux(Ubuntu) is quite obscure.

You will need CMake to generate a makefile for the static library or
to build the tests/code coverage program. Also make sure you have
libcurl and Google Test installed.

You can follow this script
https://gist.github.com/fideloper/f72997d2e2c9fbe66459 to install
libcurl.

This tutorial will help you installing properly Google Test on Ubuntu:
https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/

The CMake script located in the tree will produce Makefiles for the
creation of the static library and for the unit tests program.

To create a debug static library and a test binary, change directory
to the one containing the first CMakeLists.txt and :

mkdir build    
cd build    
cmake .. -DCMAKE_BUILD_TYPE:STRING=Debug
make

It is not clear to me what "to the one containing the first CMakeLists.txt" refers to. Is it the one in the Gtest? The one in Curl? Or What?

After trying both (the Cmake in Gtest and Curl) I still get errors while trying to #include "FTPClient.h" .

Source: Windows Questions C++

LEAVE A COMMENT