PDA

View Full Version : Additional Library Directories Not Searched



TheGrimace
11th September 2007, 14:44
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.

zotric
11th September 2007, 15:50
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.