Hello forum,
I have a special problem with my solution, which consists of several projects, each compiled as an *.dll, except one of those, which is the executable *.exe. I develop that in Visual Studio 2008 under Xp Pro.
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
1>c:\qt\qt-win-opensource-src-4.5.0\include\qtcore\../../src/corelib/codecs/qtextcodec.h(106) : warning C4251: 'QTextCodec::ConverterState::flags' : class 'QFlags<Enum>' needs to have dll-interface to be used by clients of struct 'QTextCodec::ConverterState'
1> with
1> [
1> Enum=QTextCodec::ConversionFlag
1> ]
1>c:\qt\qt-win-opensource-src-4.5.0\include\qtcore\../../src/corelib/concurrent/qtconcurrentexception.h(101) : warning C4251: 'QtConcurrent::internal::ExceptionStore::exceptionHolder' : class 'QtConcurrent::internal::ExceptionHolder' needs to have dll-interface to be used by clients of class 'QtConcurrent::internal::ExceptionStore'
1> c:\qt\qt-win-opensource-src-4.5.0\include\qtcore\../../src/corelib/concurrent/qtconcurrentexception.h(83) : see declaration of 'QtConcurrent::internal::ExceptionHolder'
1>c:\qt\qt-win-opensource-src-4.5.0\include\qtcore\../../src/corelib/concurrent/qtconcurrentresultstore.h(98) : warning C4251: 'QtConcurrent::ResultIteratorBase::mapIterator' : class 'QMap<Key,T>::const_iterator' needs to have dll-interface to be used by clients of class 'QtConcurrent::ResultIteratorBase'
1> with
1> [
1> Key=int,
1> T=QtConcurrent::ResultItem
1> ]
1> c:\qt\qt-win-opensource-src-4.5.0\include\qtcore\../../src/corelib/tools/qmap.h(268) : see declaration of 'QMap<Key,T>::const_iterator'
1> with
1> [
1> Key=int,
1> T=QtConcurrent::ResultItem
1> ]
1>c:\qt\qt-win-opensource-src-4.5.0\include\qtcore\../../src/corelib/concurrent/qtconcurrentresultstore.h(146) : warning C4251: 'QtConcurrent::ResultStoreBase::m_results' : class 'QMap<Key,T>' needs to have dll-interface to be used by clients of class 'QtConcurrent::ResultStoreBase'
1> with
1> [
1> Key=int,
1> T=QtConcurrent::ResultItem
1> ]
1> // .... and so on
|
In one of my projects I have a kind of a major class, this has no Q_OBJECT macro. In this project I added another class (nothing special just a few attributes and their getters). And since I included this new class in my first mentioned major class, I got these warnings.
I had this warning before with classes where Q_OBJECT was set; therefore I just added for each header file:
|
Source code
|
1
2
3
4
5
6
7
|
#ifdef CURRENTLY_COMPILING_LIBRARY
#define IMPORT_OR_EXPORT_SYMBOL Q_DECL_EXPORT
#else
#define IMPORT_OR_EXPORT_SYMBOL Q_DECL_IMPORT
#endif
///...
class IMPORT_OR_EXPORT_SYMBOL LibraryClass { ... }
|
and those warnings were gone (work only for Q_OBJECT?).
Anybody of you have any hints for me?
Thanks in advise. Cheers
Huck