Results 1 to 2 of 2

Thread: Additional Library Directories Not Searched

  1. #1
    Join Date
    May 2007
    Posts
    90
    Thanks
    40
    Qt products
    Qt4
    Platforms
    Windows

    Wink Additional Library Directories Not Searched

    I am running into an issue with Microsoft Visual Studio 2005 where adding the location of a directory containing a dll and its lib to the 'Additional Library Directories' property of the project fails to allow the project to see those libraries at build time. However, if I put the libraries in the same directory as the project, there is no problem. Does anyone have any idea what might be causing this issue?

    Thank you in advance.

  2. #2
    Join Date
    Aug 2007
    Location
    SW London, UK
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Additional Library Directories Not Searched

    Hi

    I think where libraries are not part of the project you have to name them explicitly.

    So it may also help to consider the following field:
    Linker page: Linker/Input/Additional Dependencies.

    To locate the environment I've found it useful to set up a new environment variable QTDEV and have this point at the qt installation base.

    So my Linker Additional Dependencies line reads:
    (Release) $(QTDEV)\lib\qtmain.lib $(QTDEV)\lib\QtGui4.lib $(QTDEV)\lib\QtCore4.lib
    (Debug) $(QTDEV)\lib\qtmaind.lib $(QTDEV)\lib\QtGuid4.lib $(QTDEV)\lib\QtCored4.lib
    And my C++ General page shows:
    (Release) "$(QTDEV)\include\QtCore";"$(QTDEV)\include\QtGui" ;"$(QTDEV)\include";.;"$(QTDEV)\include\ActiveQt"; tmp\moc\release_shared;"$(QTDEV)\mkspecs\win32-msvc2005"
    (Debug) "$(QTDEV)\include\QtCore";"$(QTDEV)\include\QtGui" ;"$(QTDEV)\include";.;"$(QTDEV)\include\ActiveQt"; tmp\moc\debug_shared;"$(QTDEV)\mkspecs\win32-msvc2005"

    And my Additional Library Directories just has:
    $(QTDEV)\lib
    But I don't know what this was doing because I have just checked and find that the program links fine without it. Maybe it is a base directory and you then only have to name the files.

    Hope this helps a bit.

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

    TheGrimace (11th September 2007)

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.