My project is named: EikeTest.pro. This pro-file includes several .h and .cpp files as shown:
PROJECT = EikeTest
QT += core gui sql
#CONFIG += debug
OBJECTS_DIR = obj
TARGET = EikeTest
TEMPLATE = app
TEMPLATE += lib
SOURCES += main.cpp\
eiketesten.cpp \
qextserialbase.cpp \
qextserialport.cpp \
gsmkommunikasjon.cpp \
tabdialog.cpp \
startprogram.cpp
HEADERS += eiketesten.h \
qextserialbase.h \
qextserialport.h \
gsmkommunikasjon.h \
tabdialog.h \
startprogram.h \
unix:HEADERS += posix_qextserialport.h
unix:SOURCES += posix_qextserialport.cpp
unix:DEFINES += _TTY_POSIX_
unix:target.path += /usr/local/lib
win32:HEADERS += win_qextserialport.h
win32:SOURCES += win_qextserialport.cpp
win32:DEFINES += _TTY_WIN_
win32:target.path += c:/WINNT
win32:DLLDESTDIR = ../
FORMS += eiketesten.ui
LIBS += -lqextserialport -L../lib
INSTALLS += target sources
DESTDIR = lib
PROJECT = EikeTest
QT += core gui sql
#CONFIG += debug
OBJECTS_DIR = obj
TARGET = EikeTest
TEMPLATE = app
TEMPLATE += lib
SOURCES += main.cpp\
eiketesten.cpp \
qextserialbase.cpp \
qextserialport.cpp \
gsmkommunikasjon.cpp \
tabdialog.cpp \
startprogram.cpp
HEADERS += eiketesten.h \
qextserialbase.h \
qextserialport.h \
gsmkommunikasjon.h \
tabdialog.h \
startprogram.h \
unix:HEADERS += posix_qextserialport.h
unix:SOURCES += posix_qextserialport.cpp
unix:DEFINES += _TTY_POSIX_
unix:target.path += /usr/local/lib
win32:HEADERS += win_qextserialport.h
win32:SOURCES += win_qextserialport.cpp
win32:DEFINES += _TTY_WIN_
win32:target.path += c:/WINNT
win32:DLLDESTDIR = ../
FORMS += eiketesten.ui
LIBS += -lqextserialport -L../lib
INSTALLS += target sources
DESTDIR = lib
To copy to clipboard, switch view to plain text mode
All these files mentioned here are located in the project directory, but not the libraries.
The header files includes the header files that are used in the class like:
#ifndef EIKETESTEN_H
#define EIKETESTEN_H
#include <qwidget.h>
#include <QChar>
.....
#include "posix_qextserialport.h"
#include "qextserialbase.h"
#include "qextserialport.h"
#include "win_qextserialport.h"
class QextSerialPort;
class GSMkommunikasjon;
class TabDialog;
class StartPageTab;
...
#ifndef EIKETESTEN_H
#define EIKETESTEN_H
#include <qwidget.h>
#include <QChar>
.....
#include "posix_qextserialport.h"
#include "qextserialbase.h"
#include "qextserialport.h"
#include "win_qextserialport.h"
class QextSerialPort;
class GSMkommunikasjon;
class TabDialog;
class StartPageTab;
...
To copy to clipboard, switch view to plain text mode
I use Ubuntu Linux as OS.
Bookmarks