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
    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.

  2. #2
    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

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

    Jasmine (22nd May 2008)

  4. #3
    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.

  5. #4
    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

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

    Jasmine (23rd May 2008)

  7. #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

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