Results 1 to 3 of 3

Thread: Error::defined after prior declaration as dllimport:

  1. #1
    Join Date
    Apr 2009
    Posts
    24
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Error::defined after prior declaration as dllimport:

    Hi, i am using this code .............
    Qt Code:
    1. QFile::QFile ( const QString & "proc.txt")
    2. {
    3. QFile file("prac.txt");
    4. if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
    5. return;
    6.  
    7. while (!file.atEnd())
    8. {
    9. QByteArray line = file.readLine();
    10. //process_line(line);
    11. }
    To copy to clipboard, switch view to plain text mode 

    then i face this type of Error
    warning: function 'QFile::QFile(const QString&)' is defined after prior declaration as dllimport: attribute ignored
    reply Plz

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Error::defined after prior declaration as dllimport:

    Sorry for being direct: You really should first learn to program with C++ and then go to Qt, since Qt is pure C++ (If you don't stuff like PyQt.)

    And for further questions please use our newbie sections!

    To your error: Don't name your own classes after qt classes and look how parameters are passed to your function.

  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Error::defined after prior declaration as dllimport:

    oh my GOD... hahahahah . LOL LOL LOL LOL

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.