Skip to content

Commit c263abd

Browse files
committed
COMP: On windows, fix unresolved external symbol "private: static class PythonQt * PythonQt::_self"
When classes were linking against PythonQt.lib, the linker was complaining. Moving the implementation of the static method "self()" to the cpp file solved the problem.
1 parent c957620 commit c263abd

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/PythonQt.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ void PythonQt::cleanup()
142142
}
143143
}
144144

145+
PythonQt* PythonQt::self() { return _self; }
146+
145147
PythonQt::PythonQt(int flags, const QByteArray& pythonQtModuleName)
146148
{
147149
_p = new PythonQtPrivate;

src/PythonQt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class PYTHONQT_EXPORT PythonQt : public QObject {
158158
static void cleanup();
159159

160160
//! get the singleton instance
161-
static PythonQt* self() { return _self; }
161+
static PythonQt* self();
162162

163163
//@}
164164

0 commit comments

Comments
 (0)