c++ - Troubles when compiling phash program -


here (probably) simple problem: i'm trying use perceptual hashing library phash ubuntu 11.10. had ffmpeg installed, way i've done:

sudo apt-get install libphash0 sudo apt-get install libphash0-dev 

then tried compile program:

#include <iostream>  #include <phash.h>  using namespace std;  int main() {     ulong64 myhash=0;      ph_dct_imagehash("test.jpg", myhash);     cout<<myhash<<endl; } 

when compiling, prints out:

undefined reference `ph_dct_imagehash' 

any suggestion? should do? in advance!

matteo monti

you forgot link phash library, linker cannot find function.

try adding -l phash gcc command line (or update makefile). if doesn't work, maybe you'll need specify library path (the location of *.a file) using -l "/usr/lib/"


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -