Results 1 to 7 of 7

Thread: cannot run!

  1. #1
    Join Date
    May 2010
    Posts
    13
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default cannot run!

    hi, i have problem when try to run my program..this error in build issue

    :-1: error: collect2: ld returned 1 exit status

    this mean what? and what should i do?
    thanks..

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: cannot run!

    It means that the linker could not link your program.

    More information about why it's not able to link is needed to give you a good answer.
    Almost always, the exact error is in the lines above the line you posted.

  3. #3
    Join Date
    May 2010
    Posts
    13
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: cannot run!

    the program doesn't hv any error .. only its show that error.

    before this i experience the same problem and solved it jus by reset the Qt programmg(or restart my pc)
    but this i tried the same solution but it doesn't work this time...

    so i don't any solution to run my program ....T_T

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: cannot run!

    *Sigh*

    The error means exactly like I said in my first reply. It is a linker error. Why you get this, I don't know, YOU need to provide information.

    What do you use to build your program? Qt Creator?
    Is your program still running when you try to rebuild it?
    Did you check the compile output to know where the linking fails?

    If you don't do any effort in explaining the questions above, you will not get a good answer.

  5. #5
    Join Date
    Jun 2010
    Posts
    8
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: cannot run!

    Are you using QtCreator? Try switching from "Build issues" panel to " Compile Output" panel and search for errors.
    I often have the program already running and the linker says: cannot open output ... permission denied ...

  6. #6
    Join Date
    May 2010
    Posts
    13
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: cannot run!

    i'm using Qt Creator...
    jus now i solved earlier problem.. thanks..i look into compile output and see the problem.

    in compile output:


    Qt Code:
    1. Running build steps for project cachedtable...
    2. Configuration unchanged, skipping QMake step.
    3. Starting: C:/Qt/2010.03/mingw/bin/mingw32-make.exe -w
    4. mingw32-make: Entering directory `C:/Documents and Settings/WISE AVIATION/Desktop/cachedtable'
    5. C:/Qt/2010.03/mingw/bin/mingw32-make -f Makefile.Debug
    6. mingw32-make[1]: Entering directory `C:/Documents and Settings/WISE AVIATION/Desktop/cachedtable'
    7. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\2010.03\qt\include\QtCore" -I"..\..\..\..\Qt\2010.03\qt\include\QtGui" -I"..\..\..\..\Qt\2010.03\qt\include\QtSql" -I"..\..\..\..\Qt\2010.03\qt\include" -I"..\..\..\..\Qt\2010.03\qt\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\Qt\2010.03\qt\mkspecs\win32-g++" -o debug\tableeditor.o tableeditor.cpp
    8. g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\cachedtable.exe debug/main.o debug/tableeditor.o debug/moc_tableeditor.o -L"c:\Qt\2010.03\qt\lib" -lmingw32 -lqtmaind -lQtSqld4 -lQtGuid4 -lQtCored4
    9. mingw32-make[1]: Leaving directory `C:/Documents and Settings/WISE AVIATION/Desktop/cachedtable'
    10. mingw32-make: Leaving directory `C:/Documents and Settings/WISE AVIATION/Desktop/cachedtable'
    11. [B]debug/moc_tableeditor.o:moc_tableeditor.cpp:(.rdata$_ZTV11TableEditor[vtable for TableEditor]+0xbc): undefined reference to `TableEditor::changeEvent(QEvent*)'[/B]
    12. collect2: ld returned 1 exit status
    13. mingw32-make[1]: *** [debug\cachedtable.exe] Error 1
    14. mingw32-make: *** [debug] Error 2
    15. Exited with code 2.
    16. Error while building project cachedtable
    17. When executing build step 'Make']
    To copy to clipboard, switch view to plain text mode 


    i delete these code and its solved my probs.. thanks..
    Last edited by kazal; 29th June 2010 at 11:14.

  7. #7
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: cannot run!

    Looks like source file that contains TableEditor class was not added to .pro file and as a result didn't get into Makefile.
    I'm a rebel in the S.D.G.

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.