Results 1 to 2 of 2

Thread: "undefined reference to" errors for MingW compiled static/dynamic libraries

  1. #1
    Join Date
    May 2011
    Posts
    14
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default "undefined reference to" errors for MingW compiled static/dynamic libraries

    Hi All,

    We are developing desktop application using QT 4.8. Previously we were using MSVC 2008 compiler for compilation and it was working fine. But now we want to switch to MingW compiler. Our project links with many internal and external static/dynamic libraries built using MingW compiler. When we tried building the application with MingW, we are getting "undefined reference to" errors for the functions defined in linked libraries. I tried nm command for finding whether those functions are exported properly. I can see those functions. Can you please guide use resolving this issue?

    I have added following lines in pro file to link to library


    Qt Code:
    1. LIBS+= -L"D:/Project/lib" -L"D:/Project/lib" -lsbml -lexpat
    2.  
    3. INCLUDEPATH += $$PWD/../Dependencies/SBML/Win32/debug/include
    4. DEPENDPATH += $$PWD/../Dependencies/SBML/Win32/debug/include
    To copy to clipboard, switch view to plain text mode 


    To check whether the library is properly exported I have created the sample application which links to that library and it worked fine.


    Thanks.

  2. #2
    Join Date
    May 2011
    Posts
    14
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "undefined reference to" errors for MingW compiled static/dynamic libraries

    Can you please help me for above post?

Similar Threads

  1. error of installing qscintilla2 on Linux "undefined reference"
    By dtustudy68 in forum Installation and Deployment
    Replies: 0
    Last Post: 31st March 2013, 23:12
  2. "undefined reference for vtable" problem
    By jepessen in forum Qt Programming
    Replies: 3
    Last Post: 14th September 2011, 20:30
  3. Replies: 2
    Last Post: 27th August 2011, 13:59
  4. Replies: 11
    Last Post: 20th March 2011, 09:38
  5. "Undefined reference to" error
    By f.tristano in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2009, 11:00

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.