Hi, as a newbie I am not sure if I am really dealing with the same problem, but I assume it goes into the same direction:
I am also trying to use an AVT library to access a "Pike" camera by Allied Vision. In VS2010 everything worked perfect, but I can't get it running in QT, even when I reduce the code to a minimal console application:
.pro:
QT += core
QT -= gui
INCLUDEPATH += C:/FirePackage/FireGrab/Lib
LIBS += C:/FirePackage/FireGrab/Lib/FGCamera.lib
LIBS += C:/FirePackage/FireGrab/Lib/FGCamera.dll
TARGET = FirePackage_Console
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
QT += core
QT -= gui
INCLUDEPATH += C:/FirePackage/FireGrab/Lib
LIBS += C:/FirePackage/FireGrab/Lib/FGCamera.lib
LIBS += C:/FirePackage/FireGrab/Lib/FGCamera.dll
TARGET = FirePackage_Console
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
To copy to clipboard, switch view to plain text mode
(please correct me if something is wrong)
main.cpp:
#include <QtCore/QCoreApplication>
#include <fgcamera.h>
int main(int argc, char *argv[])
{
CFGCamera Camera;
return a.exec();
}
#include <QtCore/QCoreApplication>
#include <fgcamera.h>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
CFGCamera Camera;
return a.exec();
}
To copy to clipboard, switch view to plain text mode
In release mode, I get this:
:: error: collect2: ld returned 1 exit status
In debug mode the following:
:: error: undefined reference to '_imp__ZN9CFGCameraD1Ev'
:: error: undefined reference to '_imp__ZN9CFGCameraD1Ev'
:: error: undefined reference to '_imp__ZN9CFGCameraD1Ev'
:: error: collect2: ld returned 1 exit status
When I comment out the CFGCamera instantiation it compiles.
Are the library files somehow not compatible with QT? Is a "conversion" necessary/possible?? Can I do that as a non-programmer?
Maybe you can tell more if you have a look at the library? You can find it here.
Thanks for your help!
Bookmarks