Results 1 to 4 of 4

Thread: How to use private static variable in a class? error: collect2: ld returned 1 exit

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Sep 2011
    Posts
    24
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to use private static variable in a class? error: collect2: ld returned 1 exi

    Yes,thanks very much!The reason is that I really have to initialize or redeclare the variable in the class definition *.cpp file like this :
    QString NewRingDialog::lastFilePath = "";
    !
    I have learned C++ for 2 years but now I realize that I have forgotten some usages in c++!!! I think I need to review it!
    Thanks very much!!!
    Last edited by furskytl; 17th September 2011 at 13:08.

Similar Threads

  1. error: collect2: ld returned 1 exit status
    By Splatify in forum Newbie
    Replies: 2
    Last Post: 13th February 2011, 18:09
  2. Replies: 3
    Last Post: 23rd January 2011, 12:15
  3. error: collect2: ld returned 1 exit status
    By srohit24 in forum Qt Programming
    Replies: 3
    Last Post: 1st December 2009, 06:32
  4. error: collect2: ld returned 1 exit status
    By nataly in forum Qt Programming
    Replies: 4
    Last Post: 13th October 2009, 13:39
  5. collect2: ld returned 1 exit status error
    By gmsk19 in forum Qt Tools
    Replies: 11
    Last Post: 25th July 2009, 02:05

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.