I am a beginner at OpenCV and trying my best to get a simple application running on an embedded platform. I cross-compiled OpenCV 2.4.4 and built it WITH_GTK=ON, WIT
In order to cross compile you need to tell pkg-config to lookup the proper path (by default this will be your host config/.pc files!)
From pkg-config website
- searching directories listed in $PKG_CONFIG_PATH
- when $PKG_CONFIG_LIBDIR is specified, it will override the compiled in default directory (e.g. /usr/lib/pkgconfig) and the PKG_CONFIG_PATH. Note that when specifying PKG_CONFIG_LIBDIR, pkg-config will completely ignore the content in PKG_CONFIG_PATH, even if the documentation states different things.