subhash.rao
24th February 2011, 06:11
Hi,
I am new to this forum,I am developing a project which includes member-function of class present in a static library..Heres the code
//.pro file
#-------------------------------------------------
#
# Project created by QtCreator 2011-02-23T22:43:47
#
#-------------------------------------------------
QT += core
QT -= gui
TARGET = testing
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += /opt/apogee/include
LIBS += /opt/apogee/include
//main.cpp
#include <QtCore/QCoreApplication>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "fitsio.h"
#include<math.h>
#include <unistd.h>
#include <time.h>
#include "tcl.h"
#include "ApogeeUsb.h"
#include "ApnCamera.h"
double as;
bool asd,cond;
namespace x
{
CApnCamera *al;
};
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
as=0.5;
cond=true;
unsigned long p=0,r=0;
unsigned short q=0;
using namespace x;
asd=al->InitDriver(p,q,r);
asd=al->Expose(as,cond);
if(asd)
printf("Initialized Properly");
return a.exec();
}
I am getting the following errors in build issues
:: error: /opt/apogee/include: No such file: File format not recognized
:: error: collect2: ld returned 1 exit status
and these errors in compile output
g++ -Wl,-rpath,/home/subhash/qtsdk-2010.05/qt/lib -o testing main.o -L/home/subhash/qtsdk-2010.05/qt/lib /opt/apogee/include -lQtCore -L/home/subhash/qtsdk-2010.05/qt/lib -lpthread
/usr/bin/ld: /opt/apogee/include: No such file: File format not recognized
collect2: ld returned 1 exit status
make: *** [testing] Error 1
make: Leaving directory `/home/subhash/testing-build-desktop'
The process "/usr/bin/make" exited with code %2.
Error while building project testing (target: Desktop)
When executing build step 'Make'
Can anyone please help me?
Thanking in advance
I am new to this forum,I am developing a project which includes member-function of class present in a static library..Heres the code
//.pro file
#-------------------------------------------------
#
# Project created by QtCreator 2011-02-23T22:43:47
#
#-------------------------------------------------
QT += core
QT -= gui
TARGET = testing
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += /opt/apogee/include
LIBS += /opt/apogee/include
//main.cpp
#include <QtCore/QCoreApplication>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "fitsio.h"
#include<math.h>
#include <unistd.h>
#include <time.h>
#include "tcl.h"
#include "ApogeeUsb.h"
#include "ApnCamera.h"
double as;
bool asd,cond;
namespace x
{
CApnCamera *al;
};
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
as=0.5;
cond=true;
unsigned long p=0,r=0;
unsigned short q=0;
using namespace x;
asd=al->InitDriver(p,q,r);
asd=al->Expose(as,cond);
if(asd)
printf("Initialized Properly");
return a.exec();
}
I am getting the following errors in build issues
:: error: /opt/apogee/include: No such file: File format not recognized
:: error: collect2: ld returned 1 exit status
and these errors in compile output
g++ -Wl,-rpath,/home/subhash/qtsdk-2010.05/qt/lib -o testing main.o -L/home/subhash/qtsdk-2010.05/qt/lib /opt/apogee/include -lQtCore -L/home/subhash/qtsdk-2010.05/qt/lib -lpthread
/usr/bin/ld: /opt/apogee/include: No such file: File format not recognized
collect2: ld returned 1 exit status
make: *** [testing] Error 1
make: Leaving directory `/home/subhash/testing-build-desktop'
The process "/usr/bin/make" exited with code %2.
Error while building project testing (target: Desktop)
When executing build step 'Make'
Can anyone please help me?
Thanking in advance