Results 1 to 1 of 1

Thread: Must I declare or not SHARED_EXPORT for an inner class ?

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Must I declare or not SHARED_EXPORT for an inner class ?

    I want to have an inner class contained by a parent class in a DLL.
    I have
    define MYCLASS_ASHARED_EXPORT Q_DECL_EXPORT at global .h for the dll
    and :
    class MYCLASS_ASHARED_EXPORT My_class_a into the h.file of the class.

    Inside the My_class_a I have an inner class : inner_class
    I can compile the dll, but I dont now hot to use the innerclass.

    I can write My_class_a::inner_class.mymethod, QT understand it, but I cant build the program because I have undefined reference to My_class_a::inner_class.mymethod.

    Must I write SHARED_EXPORT for the inner class ? How ?
    I think It can be a basic c++ question (or not...) but I need help.
    Thanks


    Added after 1:


    I answer myself....

    I have to declare the inner class with SHARED_EXPORT , that's all.
    Thanks.
    Last edited by tonnot; 14th February 2011 at 12:30.

Similar Threads

  1. How to declare global variable outside a class?
    By babygal in forum Qt Programming
    Replies: 2
    Last Post: 26th August 2010, 08:35
  2. Can't declare more than 7 QStrings ?!?!?!
    By ruben.rodrigues in forum Newbie
    Replies: 8
    Last Post: 21st July 2010, 14:42
  3. How to declare signal in qt designer??
    By hesummar in forum Qt Tools
    Replies: 4
    Last Post: 27th October 2006, 13:31
  4. declare array in a class
    By mickey in forum General Programming
    Replies: 5
    Last Post: 17th April 2006, 20:25
  5. declare in designer
    By mickey in forum Newbie
    Replies: 1
    Last Post: 23rd February 2006, 19:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.