I'm working on a qt creator plugin that adds support for certain types of files by supplying customized editors, etc. Right now it registers a new IEditorFactory which produces editors that I based off of the TextEditor::BaseTextEditor and TextEditor::BaseTextEditorWidget.
Eventually I will be creating and using specialized highlighters and other things, but for now I want to utilize things from other qt creator plugins, and this is where I run into trouble.
In particular I want to use the TextEditor::Internal::Highlighter, which can load and utilize kate files. I'm already using other classes from the TextEditor plugin so I have
include($$QTCREATOR_SOURCES/src/plugins/texteditor/texteditor.pri)
added to my project file. Inside texteditor.pri everything seems good
include(texteditor_dependencies.pri)
LIBS *= -l$$qtLibraryName(TextEditor)
and, indeed, I'm able to compile my editor (which is dependent on things inside the texteditor plugin).
The only difference with the TextEditor::Internal::Highlighter -as far as I can tell- is that it's in a subfolder of the texteditor plugin. This should be fine, and the object files seem to all land in the same directory, but when I say
new TextEditor::Internal::Highlighter()
(just as is done in texteditor/plaintexteditor.cpp) I get a linker error
Undefined symbols for architecture x86_64:
"TextEditor::Internal::Highlighter::Highlighter(QTextDocument*)", referenced from:
MyPlugin::MyEditorWidget::MyEditorWidget(QWidget*)in myeditor.o
MyPlugin::MyEditorWidget::MyEditorWidget(QWidget*)in myeditor.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
What am I doing wrong? Are there more dependencies I have to declare? Is there a command I can use to force a folder of object files to be in my path while compiling?
Thnaks!