Skip to content

Commit 4bd4a7f

Browse files
Removing cups backend and using pkg-config. Error: undefined reference to methods present in libCPDFrontend.so
1 parent 3cf2f54 commit 4bd4a7f

File tree

6 files changed

+7
-33
lines changed

6 files changed

+7
-33
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ Makefile*
3737
# QtCtreator CMake
3838
CMakeLists.txt.user*
3939

40+
libcpd.so*

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "backends/cups"]
2-
path = backends/cups
3-
url = https://github.com/anshulgupta0803/PrintDialog_Backend.git
41
[submodule "backends/gcp"]
52
path = backends/gcp
63
url = https://github.com/anshulgupta0803/gcp-backend.git

app/QCPDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <QGridLayout>
33
#include <QQuickItem>
44
#include "components.h"
5-
#include <CPD.h>
5+
#include <CPDFrontend.h>
66

77
namespace {
88
struct Command {

app/QCPDialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define QCPDIALOG_H
33

44
#include <QAbstractPrintDialog>
5+
#include <CPDFrontend.h>
56

67
class QPrinter;
78
class QGridLayout;

backends/cups

Lines changed: 0 additions & 1 deletion
This file was deleted.

common-print-dialog.pro

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ unix {
1010
target.path = /usr/lib
1111
INSTALLS += target
1212
CONFIG += link_pkgconfig
13-
PKGCONFIG += gio-unix-2.0 glib-2.0 gobject-2.0 poppler-qt5
13+
PKGCONFIG += CPDFrontend gio-unix-2.0 glib-2.0 gobject-2.0 poppler-qt5
1414
}
1515

1616
SOURCES += \
@@ -24,32 +24,8 @@ HEADERS += \
2424
cpd.h \
2525
cpd_global.h
2626

27-
28-
LIBS += -L/usr/lib/ -lCPDFrontend -lcups
29-
30-
DEPENDPATH += $$PWD/backends/cups/release/headers
31-
INCLUDEPATH += $${DEPENDPATH}
32-
3327
RESOURCES += qml.qrc
28+
DEFINES += CPD_LIBRARY
29+
DEFINES += QT_DEPRECATED_WARNINGS
3430

35-
# Additional import path used to resolve QML modules in Qt Creator's code model
36-
QML_IMPORT_PATH =
37-
38-
# Additional import path used to resolve QML modules just for Qt Quick Designer
39-
QML_DESIGNER_IMPORT_PATH =
40-
41-
# The following define makes your compiler emit warnings if you use
42-
# any feature of Qt which as been marked deprecated (the exact warnings
43-
# depend on your compiler). Please consult the documentation of the
44-
# deprecated API in order to know how to port your code away from it.
45-
DEFINES += QT_DEPRECATED_WARNINGS COMMONPRINTDIALOGLIBRARY_LIBRARY
46-
47-
# You can also make your code fail to compile if you use deprecated APIs.
48-
# In order to do so, uncomment the following line.
49-
# You can also select to disable deprecated APIs only up to a certain version of Qt.
50-
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
51-
52-
# Default rules for deployment.
53-
qnx: target.path = /tmp/$${TARGET}/bin
54-
else: unix:!android: target.path = /opt/$${TARGET}/bin
55-
!isEmpty(target.path): INSTALLS += target
31+
QMAKE_LFLAGS += -fPIC

0 commit comments

Comments
 (0)