Qsciscintilla linkerror LNK2001: sÃmbolo externo "public: static struct QMetaObject
hi,
I´m trying to use qsciscintilla in my project, i create a new class EditWindow that inherits from QsciScintilla.
Environment
Windows 7
MVS 2010 with qt add-in
Qt 4.8.0
QsciScintilla 2.6.1
When i compile my project i get this error
Quote:
error LNK2001: sÃ*mbolo externo "public: static struct QMetaObject const QsciScintilla::staticMetaObject" (?staticMetaObject@QsciScintilla@@2UQMetaObject@@B ) sin resolver C:\...Editor\moc_EditWindow.obj
Here is my EditWindow class
Code:
EditWindow.h
#include <Qsci/qsciscintilla.h>
#include <Qsci/qscilexer.h>
class EditWindow :
public QsciScintilla
{
Q_OBJECT
public:
~EditWindow( );
private:
QString mFileName;
/**< The file name with the absolute path.*/ QsciLexer *mLexer; /**< Lexer used by scintilla. It depends of the type of file*/
};
EditWindow.cpp
#include "EditWindow.h"
: QsciScintilla( parent )
{
mFile = filename;
............
}
If somebody know or have an idea of how fix this :confused:
Re: Qsciscintilla linkerror LNK2001: sÃmbolo externo "public: static struct QMetaObje
I am not sure what QscScintilla is. If it is a dll, make sure you linked the lib file. Also the following link may help: http://www.riverbankcomputing.com/pi...ch/000034.html
Re: Qsciscintilla linkerror LNK2001: sÃmbolo externo "public: static struct QMetaObje
Quote:
Originally Posted by
mentalmushroom
Thanks mentalmushroom QscinScintilla is a dll but i already linked the .lib for the debug and release version ...
Re: Qsciscintilla linkerror LNK2001: sÃmbolo externo "public: static struct QMetaObje
I think, you forgot to define QSCINTILLA_DLL. Also if you are writing your own lexer, e.g. for some another programming language, you should define SCI_LEXER, but if you don't it is not needed. I've tried to build a project similar to yours and it succeeded.