I've been trying to extend the QScintilla class to add some functionality that I'm missing, but I keep running into some errors. My header file looks like the following:

Qt Code:
  1. #ifndef EDITOR_H
  2. #define EDITOR_H
  3.  
  4. #include <QKeyEvent>
  5. #include <Qsci/qsciglobal.h>
  6. #include <Qsci/qsciscintilla.h>
  7.  
  8. class QSCINTILLA_EXPORT Editor : public QsciScintilla
  9. {
  10. Q_OBJECT
  11.  
  12. public:
  13. Editor(QWidget* parent = 0);
  14. virtual ~Editor();
  15.  
  16. signals:
  17.  
  18. public slots:
  19. void keyPressEvent(QKeyEvent* e);
  20.  
  21. private:
  22.  
  23. };
  24.  
  25. #endif // EDITOR_H
To copy to clipboard, switch view to plain text mode 

My current .pro file looks as:

Qt Code:
  1. #-------------------------------------------------
  2. #
  3. # Project created by QtCreator 2011-09-20T18:58:15
  4. #
  5. #-------------------------------------------------
  6. # http://hackage.haskell.org/trac/haskell-prime/wiki/UnicodeInHaskellSource
  7.  
  8. TARGET = naelc
  9. TEMPLATE = app
  10. QT += core gui
  11. DEFINES += QSCINTILLA_DLL #__SPECIAL_WINDOWS_DEFINE__
  12. LIBS += -lqscintilla2
  13. DEPENDPATH += .
  14.  
  15. SOURCES += src/main.cpp\
  16. src/naelc.cpp \
  17. src/projectswidget.cpp \
  18. src/editorwidget.cpp \
  19. src/constants.cpp \
  20. src/project.cpp \
  21. src/orientationbutton.cpp \
  22. src/module.cpp \
  23. src/editor.cpp
  24.  
  25. HEADERS += src/naelc.h \
  26. src/projectswidget.h \
  27. src/editorwidget.h \
  28. src/constants.h \
  29. src/project.h \
  30. src/orientationbutton.h \
  31. src/module.h \
  32. src/editor.h \
  33.  
  34. FORMS += ui/naelc.ui \
  35. ui/projectswidget.ui \
  36. ui/editorwidget.ui
  37.  
  38. RESOURCES += \
  39. resources.qrc
To copy to clipboard, switch view to plain text mode 

When I compile this though, I keep getting the following errors:

Qt Code:
  1. ./release\editorwidget.o:editorwidget.cpp:(.text+0x313): undefined reference to `_imp___ZN6EditorC1EP7QWidget'
  2. ./release\editorwidget.o:editorwidget.cpp:(.text+0x713): undefined reference to `_imp___ZN6EditorC1EP7QWidget'
  3. ./release\editor.o:editor.cpp:(.text+0xfb): undefined reference to `_imp___ZTV6Editor'
  4. ./release\editor.o:editor.cpp:(.text+0x123): undefined reference to `_imp___ZTV6Editor'
  5. ./release\editor.o:editor.cpp:(.text+0x153): undefined reference to `_imp___ZTV6Editor'
  6. ./release\editor.o:editor.cpp:(.text+0x197): undefined reference to `_imp___ZTV6Editor'
  7. ./release\editor.o:editor.cpp:(.text+0x1cb): undefined reference to `_imp___ZTV6Editor'
  8. ./release\moc_editor.o:moc_editor.cpp:(.text+0x15): undefined reference to `_imp___ZN6Editor16staticMetaObjectE'
  9. ./release\moc_editor.o:moc_editor.cpp:(.text+0x26): undefined reference to `_imp___ZN6Editor16staticMetaObjectE'
To copy to clipboard, switch view to plain text mode 

I have no clue what is going on here. My guess would be that I would have to define Editor in a separate project and export it's own .dll file and use that inside my project.