Open carlosmanri opened 7 years ago
@Manri98 The error message means that builds can't be run in the source directory tracked by git. Here's the solution:
cd build && cmake ..
If that runs successfully, edit libtvdb/src/tvdb_key.h
to include your TVDB API key. Then run make
in the build
dir. If that runs successfully, a static library should be generated...
build/src/libtvdb.a
If you ran into missing dependencies during the build, make sure libcurl
and libxml2
are installed. On Debian or Ubuntu:
sudo apt-get install libcurl4-gnutls-dev libxml2-dev
Thank you so much, got it. So no if I want to use the functions I can just include the .a file or I need to link it when I compile it.
Copy tvdb_key_template.h
to a file named tvdb_key.h
and then edit it to use your TVDB API key. In your code that will use the functions:
#include "tvdb.h"
#include "tvdb_key.h"
And, you will need to link in libtvdb.a
at compile time.
Excuse me again but I have another issue. When I init libtvdb with
htvdb_t tvdb = tvdb_init(MY_API_KEY);
I get the next error:
error: undefined reference to tvdb_init(char const*)
but tvdb_init is already defined in tvdb.h
Hi, I tried to build the library using
cmake CmakeLists.txt
and I get the next error: CMake Error at cmake/modules/MacroOutOfSourceBuild.cmake:10 (MESSAGE): libtvdb requires an out of source build. What is happening?