HTTrack Programming page - using the library
Every library prototype is declared in httrack-library.h. Build against it with pkg-config --cflags --libs libhttrack, which adds $(includedir)/httrack to the include path and links -lhttrack.
The headers an install gives you
Installing the library puts these headers in $(includedir)/httrack, and no others:
- httrack-library.h
- htsglobal.h
- htsopt.h
- htswrap.h
- htsconfig.h
- htsfeatures.h
- htsmodules.h
- htsbasenet.h
- htsnet.h
- htsbauth.h
- htsdefines.h
- htsstrings.h
- htsarrays.h
- htssafe.h
Every other header under src/ is engine-internal, so a file that includes one of them compiles only inside the source tree.
Worked examples
The examples install next to the library, in $(datadir)/httrack/libtest, and they include no header an install does not carry. example-main.c drives a whole mirror from a program, and each callbacks-example-*.c file shows one callback. The callbacks page documents the hooks themselves.
The command-line front end src/httrack.c is not one of them. It ships in the source tarball only, and it includes engine-internal headers (htsbase.h, httrack.h, htslib.h, htscharset.h, htsbacktrace.h and htsthread.h) that an install does not carry.