qlands
21st March 2012, 09:33
Hi,
I'm getting undefined reference when I build an application in Windows witn mingw32 (it does not happen in Linux). The application is divided in two parts:
1. A set of designer plugins with the PRO like:
QT += core gui sql
CONFIG += designer plugin debug_and_release
TARGET = $$qtLibraryTarget(impwidgetsplugin)
TEMPLATE = lib
....
This generate the files: libimpwidgetsplugin.a and impwidgetsplugin.dll in c:\ilri\crossimpact\
2. A set of plugins in a library that requires impwidgetsplugin with the PRO like:
QT += core gui sql svg
TARGET = $$qtLibraryTarget(impmainmodules)
TEMPLATE = lib
CONFIG += plugin
win32:LIBS += c:\ilri\crossimpact\libimpwidgetsplugin.a
....
The problem is that I always get:
./debug\plots.o:C:\ilri\crossimpact\plugins\syschar\ impmainmodules/modules/plots.cpp:203: undefined reference to `impgenmaint::insertKeyField(QString, QVariant, bool)'
Here, impgenmaint::insertKeyField(QString, QVariant, bool) is defined in the designer plugin impwidgetsplugin.dll
I can see that mingw32 is apparently using the library:
mingw32-make[1]: Entering directory `C:/ilri/crossimpact/plugins/syschar/impmainmodules'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -shared -Wl,--out-implib,..\..\..\libimpmainmodules.a -o ..\..\..\impmainmodules.dll object_script.impmainmodules.Debug -L"c:\Qt\2010.03\qt\lib" c:\ilri\crossimpact\libimpwidgetsplugin.a -lQtSvgd4 -lQtSqld4 -lQtGuid4 -lQtCored4
Any idea how I need to configure the PRO so it properly links it?
Many thanks for any help.
Carlos.
I'm getting undefined reference when I build an application in Windows witn mingw32 (it does not happen in Linux). The application is divided in two parts:
1. A set of designer plugins with the PRO like:
QT += core gui sql
CONFIG += designer plugin debug_and_release
TARGET = $$qtLibraryTarget(impwidgetsplugin)
TEMPLATE = lib
....
This generate the files: libimpwidgetsplugin.a and impwidgetsplugin.dll in c:\ilri\crossimpact\
2. A set of plugins in a library that requires impwidgetsplugin with the PRO like:
QT += core gui sql svg
TARGET = $$qtLibraryTarget(impmainmodules)
TEMPLATE = lib
CONFIG += plugin
win32:LIBS += c:\ilri\crossimpact\libimpwidgetsplugin.a
....
The problem is that I always get:
./debug\plots.o:C:\ilri\crossimpact\plugins\syschar\ impmainmodules/modules/plots.cpp:203: undefined reference to `impgenmaint::insertKeyField(QString, QVariant, bool)'
Here, impgenmaint::insertKeyField(QString, QVariant, bool) is defined in the designer plugin impwidgetsplugin.dll
I can see that mingw32 is apparently using the library:
mingw32-make[1]: Entering directory `C:/ilri/crossimpact/plugins/syschar/impmainmodules'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -shared -Wl,--out-implib,..\..\..\libimpmainmodules.a -o ..\..\..\impmainmodules.dll object_script.impmainmodules.Debug -L"c:\Qt\2010.03\qt\lib" c:\ilri\crossimpact\libimpwidgetsplugin.a -lQtSvgd4 -lQtSqld4 -lQtGuid4 -lQtCored4
Any idea how I need to configure the PRO so it properly links it?
Many thanks for any help.
Carlos.