Results 1 to 2 of 2

Thread: Linking against a .lib built from visual studio

  1. #1
    Join Date
    Jul 2010
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11 Maemo/MeeGo

    Default Linking against a .lib built from visual studio

    Hello all
    I have qt5.4 installed on windows 2007 and I can build a simple hello world using the mingw compiler without issues. I also have some static ".libs" that i need to link against that were built with an older version of visual studio 2004 "msvc compiler" on windows xp. After I setup the .pro file to include all the .libs and paths I get udefined references no matter what I try. Next i tried a different route I have windows c++ visual studio 2010 installed so I installed the Qt plugin using the "msvc compiler version" and can create a simple qt5.4 project in it and it runs fine. But when I link in these static libs I still get undefined references. Is it even possible to link against these static libs with qt seeing how they were built under a different compiler? Thanks for any help.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Linking against a .lib built from visual studio

    This not related to Qt but C++ on Windows.
    You need to build the libraries with the same compiler as the application.

    Cheers,
    _

Similar Threads

  1. Using Qt 5.4.1 Visual Studio 2013 libs in Visual Studio 2010
    By ^NyAw^ in forum Installation and Deployment
    Replies: 0
    Last Post: 6th March 2015, 10:20
  2. Dynamic linking visual studio compiler with .pro file
    By scarecr0w132 in forum Qt Programming
    Replies: 2
    Last Post: 12th September 2013, 06:03
  3. Replies: 2
    Last Post: 20th December 2010, 06:58
  4. Visual Studio Plugin (1.1.6) crashes Visual Studio (2010)
    By mboeni in forum Installation and Deployment
    Replies: 0
    Last Post: 11th October 2010, 16:46
  5. Linking Error when Creating DLL with Visual Studio
    By stretchtiberius in forum Qt Programming
    Replies: 6
    Last Post: 10th February 2009, 19:31

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.