From c5791bdba49b888648d2d5d4722f838af2e97bb9 Mon Sep 17 00:00:00 2001 From: Remi Thebault Date: Fri, 26 Dec 2014 00:03:28 +0100 Subject: [PATCH 1/2] initial commit --- qbsbug.qbs | 12 ++++++++++++ qbsbug_app/main.cpp | 9 +++++++++ qbsbug_app/qbsbug_app.qbs | 18 ++++++++++++++++++ qbsbug_dll/include/qb/qb.hpp | 15 +++++++++++++++ qbsbug_dll/qb.cpp | 13 +++++++++++++ qbsbug_dll/qbsbug_dll.qbs | 28 ++++++++++++++++++++++++++++ 6 files changed, 95 insertions(+) create mode 100644 qbsbug.qbs create mode 100644 qbsbug_app/main.cpp create mode 100644 qbsbug_app/qbsbug_app.qbs create mode 100644 qbsbug_dll/include/qb/qb.hpp create mode 100644 qbsbug_dll/qb.cpp create mode 100644 qbsbug_dll/qbsbug_dll.qbs diff --git a/qbsbug.qbs b/qbsbug.qbs new file mode 100644 index 0000000..52a5435 --- /dev/null +++ b/qbsbug.qbs @@ -0,0 +1,12 @@ +import qbs 1.0 + +Project { + name: "qbsbug" + + references: [ + "qbsbug_app/qbsbug_app.qbs", + "qbsbug_dll/qbsbug_dll.qbs", + ] + +} + diff --git a/qbsbug_app/main.cpp b/qbsbug_app/main.cpp new file mode 100644 index 0000000..35a0478 --- /dev/null +++ b/qbsbug_app/main.cpp @@ -0,0 +1,9 @@ + +#include "qb/qb.hpp" + +int main() +{ + qb::useSymbol(); + return 0; +} + diff --git a/qbsbug_app/qbsbug_app.qbs b/qbsbug_app/qbsbug_app.qbs new file mode 100644 index 0000000..5af7262 --- /dev/null +++ b/qbsbug_app/qbsbug_app.qbs @@ -0,0 +1,18 @@ +import qbs 1.0 + +CppApplication { + Depends { name: "cpp" } + Depends { name: "qbsbug_dll" } + name: "qbsbug_app" + + files: [ + "main.cpp", + ] + + Group { + fileTagsFilter: "application" + qbs.install: true + qbs.installDir: "." + } +} + diff --git a/qbsbug_dll/include/qb/qb.hpp b/qbsbug_dll/include/qb/qb.hpp new file mode 100644 index 0000000..8a4e4ba --- /dev/null +++ b/qbsbug_dll/include/qb/qb.hpp @@ -0,0 +1,15 @@ + +#include + +#ifdef QB_LIBRARY +# define QB_API Q_DECL_EXPORT +#else +# define QB_API Q_DECL_IMPORT +#endif + + +namespace qb { + + QB_API void useSymbol(); + +} diff --git a/qbsbug_dll/qb.cpp b/qbsbug_dll/qb.cpp new file mode 100644 index 0000000..f30dd36 --- /dev/null +++ b/qbsbug_dll/qb.cpp @@ -0,0 +1,13 @@ + +#include "qb/qb.hpp" + +#include + +namespace qb { + + void useSymbol() { + std::cout << "symbol used!" << std::endl; + } + +} + diff --git a/qbsbug_dll/qbsbug_dll.qbs b/qbsbug_dll/qbsbug_dll.qbs new file mode 100644 index 0000000..2dc1088 --- /dev/null +++ b/qbsbug_dll/qbsbug_dll.qbs @@ -0,0 +1,28 @@ +import qbs 1.0 + +DynamicLibrary { + Depends { name: "cpp" } + Depends { name: "Qt.core" } + name: "qbsbug_dll" + + cpp.defines: ["QB_LIBRARY"] + cpp.includePaths: "include" + + files: [ + "include/qb/qb.hpp", + "qb.cpp", + ] + + Group { + fileTagsFilter: "dynamiclibrary" + qbs.install: true + qbs.installDir: "." + } + + Export { + Depends { name: "cpp" } + Depends { name: "Qt.core" } + cpp.includePaths: "include" + } +} + -- 1.8.5.2.msysgit.0