Hi, when I try to build a shared lib with QMake (on Linux) I obtain 4 output files:
libxxx.so
libxxx.so.1
libxxx.so.1.0
libxxx.so.1.0.0
libxxx.so
libxxx.so.1
libxxx.so.1.0
libxxx.so.1.0.0
To copy to clipboard, switch view to plain text mode
This is the .pro file:
TARGET = test
TEMPLATE = lib
CONFIG += shared dll
DEFINES += TEST_LIBRARY
SOURCES += test.cpp
HEADERS += test.h\
test_global.h
TARGET = test
TEMPLATE = lib
CONFIG += shared dll
DEFINES += TEST_LIBRARY
SOURCES += test.cpp
HEADERS += test.h\
test_global.h
To copy to clipboard, switch view to plain text mode
The global define header:
#ifndef TEST_GLOBAL_H
#define TEST_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(TEST_LIBRARY)
# define TESTSHARED_EXPORT Q_DECL_EXPORT
#else
# define TESTSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // TEST_GLOBAL_H
#ifndef TEST_GLOBAL_H
#define TEST_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(TEST_LIBRARY)
# define TESTSHARED_EXPORT Q_DECL_EXPORT
#else
# define TESTSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // TEST_GLOBAL_H
To copy to clipboard, switch view to plain text mode
And the very trivial exported class declaration:
#ifndef TEST_H
#define TEST_H
#include "test_global.h"
class TESTSHARED_EXPORT Test {
public:
Test();
};
#endif // TEST_H
#ifndef TEST_H
#define TEST_H
#include "test_global.h"
class TESTSHARED_EXPORT Test {
public:
Test();
};
#endif // TEST_H
To copy to clipboard, switch view to plain text mode
Is it normal?
Bookmarks