File tree Expand file tree Collapse file tree
extensions/PythonQt_QtAll Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ void PythonQt_init_QtWebKit(PyObject*);
7676#endif
7777
7878namespace PythonQt_QtAll {
79- PYTHONQT_EXPORT void init ()
79+ PYTHONQT_QTALL_EXPORT void init ()
8080{
8181#ifdef PYTHONQT_WITH_CORE
8282 PythonQt_init_QtCore (0 );
Original file line number Diff line number Diff line change 3333 *
3434 */
3535
36- #include " PythonQtSystem.h" // For PYTHONQT_EXPORT
36+ // Export macro for the PythonQt_QtAll symbols.
37+ // qmake builds define PYTHONQT_QTALL_EXPORTS for the dedicated QtAll DLL,
38+ // while CMake builds compile this source into the PythonQt target which defines
39+ // PYTHONQT_EXPORTS. Treat either define as "building" to avoid dllimport on
40+ // in-target function definitions.
41+ #if defined(WIN32)
42+ #if defined(PYTHONQT_QTALL_EXPORTS) || defined(PYTHONQT_EXPORTS)
43+ #define PYTHONQT_QTALL_EXPORT __declspec (dllexport)
44+ #else
45+ #define PYTHONQT_QTALL_EXPORT __declspec (dllimport)
46+ #endif
47+ #else
48+ #if defined(PYTHONQT_QTALL_EXPORTS) || defined(PYTHONQT_EXPORTS)
49+ #define PYTHONQT_QTALL_EXPORT __attribute__ ((__visibility__(" default" )))
50+ #else
51+ #define PYTHONQT_QTALL_EXPORT
52+ #endif
53+ #endif
3754
3855namespace PythonQt_QtAll {
3956// ! Initialize the Qt bindings enabled at configuration time
40- PYTHONQT_EXPORT void init ();
57+ PYTHONQT_QTALL_EXPORT void init ();
4158}
4259
4360#endif
You can’t perform that action at this time.
0 commit comments