kevinn 0 Newbie Poster

Hi,

I need to write some code for an application that uses a camera with an gigabit ethernet connection. The company who made the camera has provided header files to read images from the camera. The files are : ImageLib.h , PvApi.h and PvRegIo.h.
I wrote some code in Snap.cpp and when i compile it this way :

g++-4.4 -Wl,--rpath -Wl,./   -O3 -fno-strict-aliasing -fexceptions -I/usr/include -D_x86 -D_LINUX -Wall -Wno-unused-function `pkg-config --cflags opencv` -D_REENTRANT  Snap.cpp -o Snap -lpthread -lrt -Bdynamic -lm -lc -lPvAPI `pkg-config --libs opencv`

Everything works.

But when i try to put this in an .pro file it won't compile anymore. The reason i want to put this in a .pro file is because the main project has an .pro file so when I succeed in creating a .pro file for this example I can just copy these line into my main project's .pro file to use this code.

My current .pro file for the example i am trying looks like this :

CONFIG += link_pkgconfig
PKGCONFIG += opencv
PRECOMPILED_HEADER = ImageLib.h
PRECOMPILED_HEADER = PvApi.h
PRECOMPILED_HEADER = PvRegIo.h
SOURCES += Snap.cpp
LIBS += -lrt
LIBS += -Bdynamic
LIBS += -lm
LIBS += -lc
LIBS += -lPvAPI
TARGET = Snap

But when I do "qmake Snap.pro" and then "make" it wont compile.
Can anyone help plz?