[Qt-interest] Qt 4.5+MinGW+ld.exe+DLL

André Prins a.h.prins at gmail.com
Wed Aug 5 11:17:31 CEST 2009


Dear All,

At first glance the specified project-file looks OK. I am curious
about one thing: Is there perhaps a problem with spaces in the
library-directory for postgreSQL, which as a result breaks the
remaining parts in the LIBS variable?

What I usually do is to separate LIBPATH and LIBS. In your case this
would be something like:
    LIBPATH += c:/Archivos de programa/postgreSQL/8.3/lib \
                       d:/tesis/src/logica

    LIBS += -lpq \
                 -llogica \

Some hints: can you check whether a logica .dll or .a -file is
actually build in that location? Secondly, can you post the
command-line used by the linker. In general this is the last command,
just before the error and will look something like

    g++ -enable-stdcall-fixup -Wl,-enable-auto-import
        . . .
    -llogica -lQtGuid4 -lQtCored4

or something similar. There you can also find the actual -L and -l
flags specified to the linker, which you can also check.

Considering the name of the library when building a DLL, it depends on
the version of MinGW used and the configuration by QMake or QtCreator.
It can for example be liblogica.dll.a, but also liblogica.a. When you
have done nothing to change the name, -llogica is correct and mingw
will know which parts to prepend and append when searching for the
file.


Kind Regards,
André





On Wed, Aug 5, 2009 at 4:53 AM, Andre Haupt<andre at bitwigglers.org> wrote:
> On Tue, Aug 04, 2009 at 01:24:14PM -0400, John McClurkin wrote:
>> If the OP created a dynamic library, wouldn't the name be liblogica.dll?
> In this case it would be just logica.dll, i think?
>
> regards,
>
> Andre
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>




More information about the Qt-interest-old mailing list