Results 1 to 17 of 17

Thread: QT static with vs2005: error LNK2001: unresolved external symbol

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Thanks
    55
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QT static with vs2005: error LNK2001: unresolved external symbol

    So, are there really 4.2.1 libs in c:\qt\4.2.0-static\lib (instead of c:\qt\4.2.1-static\lib)? If not, then fix your paths, or put the libs in there.
    Software Engineer



  2. #2
    ucomesdag Guest

    Default Re: QT static with vs2005: error LNK2001: unresolved external symbol

    Quote Originally Posted by gfunk View Post
    So, are there really 4.2.1 libs in c:\qt\4.2.0-static\lib (instead of c:\qt\4.2.1-static\lib)? If not, then fix your paths, or put the libs in there.
    No you got me wrong I wrote 4.2.1 from the beginning of this thread but meant 4.2.0 and yes the libs are there... And stuff compiles fine from the command line... I just cant get it to work from vs2005 (I must be really dumb )...
    Last edited by ucomesdag; 2nd December 2006 at 22:24.

  3. #3
    Join Date
    Jan 2007
    Posts
    1
    Thanked 1 Time in 1 Post

    Thumbs up Re: QT static with vs2005: error LNK2001: unresolved external symbol

    Yes this is looks like VS issue. What I did to fix it:

    -created a new .pro file
    -open new .vcproj file from .pro using QT Visual Studio integration

    After these steps it works for me.

  4. The following user says thank you to raytmao for this useful post:

    arunredi (16th May 2008)

  5. #4
    Join Date
    Apr 2008
    Location
    California
    Posts
    25
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QT static with vs2005: error LNK2001: unresolved external symbol

    Quote Originally Posted by raytmao View Post
    Yes this is looks like VS issue. What I did to fix it:

    -created a new .pro file
    -open new .vcproj file from .pro using QT Visual Studio integration

    After these steps it works for me.
    Guys,

    I just had a similar situation and spent almost a full day googling a searching thru the forms toVS 2005 situation. FInally I found the soultion in this thread. Thank you all.
    - AR

  6. #5
    Join Date
    May 2008
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT static with vs2005: error LNK2001: unresolved external symbol

    HI..I am a newbie.
    I am having problem
    "
    Performing moc on MainWindow.h
    Compiling...
    main.cpp
    MainWindow.cpp
    moc_MainWindow.cpp
    Generating Code...
    Compiling manifest to resources...
    Linking...
    LINK : fatal error LNK1104: cannot open file 'qtmaind.lib'
    "
    I am using Qt4.4.0 open source with VS 2005 in Window.
    I installed Library path and linker data.
    Can anybody help me this problem?

    Thanks in advance.

  7. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QT static with vs2005: error LNK2001: unresolved external symbol

    Seems like you don't have debug version of Qt. So generate the project file in release mode:
    Qt Code:
    1. qmake -tp vc -config release
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  8. The following user says thank you to jpn for this useful post:

    Jasmine (22nd May 2008)

  9. #7
    Join Date
    May 2008
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT static with vs2005: error LNK2001: unresolved external symbol

    Hi.. Thanks for your answer.
    I tried it out in release version

    qmake -tp vc -config release

    then.. I found error
    WARNING: Unable to generate output for C:/Qt/4.4.0/Makefile.Release [TEMPLATE vcapp]
    WARNING: Unable to generate output for C:/Qt/4.4.0/Makefile.Debug [TEMPLATE vcapp]
    What should I install for right version?
    Should I delete and reinstall everything?
    Please kindly reply me.

  10. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QT static with vs2005: error LNK2001: unresolved external symbol

    I meant to run that command in the project directory, not in Qt installation directory. That's the command to generate a Visual Studio project out of a qmake project file. That's how you created the Visual Studio project in the first place, right?
    J-P Nurmi

  11. The following user says thank you to jpn for this useful post:

    Jasmine (23rd May 2008)

  12. #9
    Join Date
    May 2008
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT static with vs2005: error LNK2001: unresolved external symbol

    Thanks a lot.

    Quote Originally Posted by jpn View Post
    I meant to run that command in the project directory, not in Qt installation directory. That's the command to generate a Visual Studio project out of a qmake project file. That's how you created the Visual Studio project in the first place, right?
    I reinstalled MinGw with following components,
    * MinGW base tools
    * G++ compiler
    * MinGW make

    then I changed the path and type in VC command prompt
    1. qmake -project
    2. qmake
    3. make
    It work out now.

Similar Threads

  1. link error for visual studio.net 2003
    By berlin in forum Newbie
    Replies: 9
    Last Post: 29th September 2006, 16:06
  2. Link Errors
    By magikalpnoi in forum Qt Programming
    Replies: 5
    Last Post: 25th September 2006, 22:04
  3. MS Visual Studio 6 Problems
    By dayrinni in forum Installation and Deployment
    Replies: 2
    Last Post: 23rd August 2006, 06:59
  4. Problems using DLL
    By larsli in forum Qt Programming
    Replies: 11
    Last Post: 15th July 2006, 10:18
  5. Unresolved External Symbol
    By munna in forum General Discussion
    Replies: 1
    Last Post: 10th May 2006, 19:25

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.