aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/api/testdata/link-dynamiclibs/lib2.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-02-24 16:35:12 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-02-26 19:24:16 +0000
commitd998a537d20947e6d516a598f1bdeca154ca6794 (patch)
tree5b9372d692d1d06651e0d553e10b3331f59b014c /tests/auto/api/testdata/link-dynamiclibs/lib2.cpp
parent6c3fb5a4f33fc1966aee1eaff580fd17be7ab27e (diff)
Rename dynamicLibs autotest to link-dynamiclibs
This is consistent with other tests regarding linking. Change-Id: Ie444bca99f0b0385fb85c00927c89bbf18855bd1 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'tests/auto/api/testdata/link-dynamiclibs/lib2.cpp')
-rw-r--r--tests/auto/api/testdata/link-dynamiclibs/lib2.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/auto/api/testdata/link-dynamiclibs/lib2.cpp b/tests/auto/api/testdata/link-dynamiclibs/lib2.cpp
new file mode 100644
index 000000000..4c24b2b75
--- /dev/null
+++ b/tests/auto/api/testdata/link-dynamiclibs/lib2.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qbs.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdio.h>
+
+#if defined(_WIN32) || defined(WIN32)
+# define EXPORT __declspec(dllexport)
+# define IMPORT __declspec(dllimport)
+#else
+# define EXPORT __attribute__((visibility("default")))
+# define IMPORT
+#endif
+
+IMPORT void lib3_hello();
+
+EXPORT void lib2_hello()
+{
+ puts("lib2 says hello!");
+ lib3_hello();
+}
+