Hi ppl,

have a relatively straightforward problem, but can't seem to figure out what's happening here.

I've created a shared library with Qt. It compiles fine, and is installed. I try to instantiate an object from one of the defined classes in main.cpp of a program using the library.

Qt Code:
  1. #include <myClass.h>
  2.  
  3. int main(int argc, char *argv[])
  4. {
  5. QApplication a(argc, argv);
  6.  
  7. ManiDialog *w = new ManiDialog( 0 );
  8.  
  9. MyClass *m = new MyClass();
  10.  
  11. w->show();
  12. return a.exec();
  13. }
To copy to clipboard, switch view to plain text mode 

The library is added to the .pro file, the include path is set. I've used the Q_DECL_EXPORT macro in the library (QtCreator created this automatically for me). I don't know if that is important to this. MyClass is a concrete class, whose abstract base class is also defined in the library.

Qt Code:
  1. class MyClass LIBMYCLASS_EXPORT : public MyOtherClass
To copy to clipboard, switch view to plain text mode 

I get the following error when running "Build" in QtCreator:
Qt Code:
  1. main.cpp:10: error: ‘m’ was not declared in this scope
  2. main.cpp:10: error: expected type-specifier before ‘MyClass’
  3. main.cpp:10: error: expected ‘;’ before ‘MyClass’
  4. make: *** [main.o] Error 1
To copy to clipboard, switch view to plain text mode 

Can anyone help me out? This seems so straightforward...

Thanks,
Stephan