[Qt-interest] Qt 4.5+MinGW+ld.exe+DLL
Andre Haupt
andre at bitwigglers.org
Tue Aug 4 12:35:09 CEST 2009
On Tue, Aug 04, 2009 at 12:04:19PM -0400, alvaro wrote:
> Hi everyone,
>
> I have a problem with MinGW. I have installed Qt-4.5 with MinGW and Qt
> creator and wrote a library (DLL) that a want to use in another project,
> actually another DLL library and this libraries i want to add to a Qt
> GUI application.
>
> When compiling ld.exe do not find the DLL library that i want. This is
> my QMake project file.
>
> # -------------------------------------------------
>
> # Project created by QtCreator 2009-08-02T20:27:22
>
> # -------------------------------------------------
>
> QT -= core \
>
> gui
>
> CONFIG += no_lflags_merge
>
> TARGET = datos
>
> TEMPLATE = lib
>
> DEFINES += DATOS_LIBRARY
>
> SOURCES += datos.cpp \
>
> sqlfactory.cpp \
>
> sqlusuario.cpp
>
> HEADERS += datos.h \
>
> datos_global.h \
>
> sqlfactory.h \
>
> sqlusuario.h
>
> INCLUDEPATH = -I"c:/Archivos de programa/postgreSQL/8.3/include" \
>
> -I"d:/tesis/src/logica" \
>
> "d:/tesis/src/datos"
>
> win32:LIBS += -L"c:/Archivos de programa/postgreSQL/8.3/lib" \
>
> -lpq \
>
> -L"d:/tesis/src/logica" \
> -llogica
>
>
> And the compilers error is:
>
> C:\Qt\2009.02\mingw\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe:
> cannot find -llogica
>
>
> Searching the web a found that ld.exe only look for files on the default
> paths. My library is not in the default path. I've add the path of the
> libraries to de Windows PATH but nothing.
With the -L switch you add the specified path to the library path, so it should find it.
Do you really have liblogica.a available under this path?
regards,
Andre
More information about the Qt-interest-old
mailing list