Bug 365820 - cannot build due to duplicate definitions for payeeidentifierloader when linking
Summary: cannot build due to duplicate definitions for payeeidentifierloader when linking
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.8.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-18 17:25 UTC by Jeff
Modified: 2019-08-31 08:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1
ralf.habacker: Version_5-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff 2016-07-18 17:25:57 UTC
When building on Windows/mingw, the link for kmymoney.exe fails as shown below. I can get a build if I edit the generated kmymoney\CMakeFiles\kmymoney.dir\link.txt file and remove the "..\bin\libkmm_payeeidentifier_loader.a" reference and rebuild without reconfiguring. Have the same problem with the 4.7 and 4.8 branches. Also had this problem in building some of the test programs, but I just stopped building the test programs rather than edit the link.txt files.

------------------------
Linking CXX executable ..\bin\kmymoney.exe
..\bin\libkmm_payeeidentifier_loader.a(payeeidentifierloader.cpp.obj): In function `ZN21payeeIdentifierLoader22translatedDelegateNameERK7QString':
q:/kmymoney/kmymoney/mymoney/payeeidentifier/payeeidentifierloader.cpp:128: multiple definition of `payeeIdentifierLoader::translatedDelegateName(QString const&)'
..\bin\libkmm_mymoney.dll.a(d000889.o):(.text+0x0): first defined here
..\bin\libkmm_payeeidentifier_loader.a(payeeidentifierloader.cpp.obj): In function `ZN21payeeIdentifierLoader21createPayeeIdentifierERK7QString':
q:/kmymoney/kmymoney/mymoney/payeeidentifier/payeeidentifierloader.cpp:53: multiple definition of `payeeIdentifierLoader::createPayeeIdentifier(QString const&)'
..\bin\libkmm_mymoney.dll.a(d000888.o):(.text+0x0): first defined here
..\bin\libkmm_payeeidentifier_loader.a(payeeidentifierloader.cpp.obj): In function `ZN21payeeIdentifierLoader36createPayeeIdentifierFromSqlDatabaseE12QSqlDatabaseRK7QStringS3_':
q:/kmymoney/kmymoney/mymoney/payeeidentifier/payeeidentifierloader.cpp:80: multiple definition of `payeeIdentifierLoader::createPayeeIdentifierFromSqlDatabase(QSqlDatabase, QString const&, QString const&)'
..\bin\libkmm_mymoney.dll.a(d000891.o):(.text+0x0): first defined here
..\bin\libkmm_payeeidentifier_loader.a(payeeidentifierloader.cpp.obj): In function `ZN21payeeIdentifierLoader18availableDelegatesEv':
q:/kmymoney/kmymoney/mymoney/payeeidentifier/payeeidentifierloader.cpp:118: multiple definition of `payeeIdentifierLoader::availableDelegates()'
..\bin\libkmm_mymoney.dll.a(d000885.o):(.text+0x0): first defined here
..\bin\libkmm_payeeidentifier_loader.a(payeeidentifierloader.cpp.obj): In function `ZN21payeeIdentifierLoader18createItemDelegateERK7QStringP7QObject':
q:/kmymoney/kmymoney/mymoney/payeeidentifier/payeeidentifierloader.cpp:95: multiple definition of `payeeIdentifierLoader::createItemDelegate(QString const&, QObject*)'
..\bin\libkmm_mymoney.dll.a(d000886.o):(.text+0x0): first defined here
..\bin\libkmm_payeeidentifier_loader.a(payeeidentifierloader.cpp.obj): In function `ZN21payeeIdentifierLoader19hasItemEditDelegateERK7QString':
q:/kmymoney/kmymoney/mymoney/payeeidentifier/payeeidentifierloader.cpp:110: multiple definition of `payeeIdentifierLoader::hasItemEditDelegate(QString const&)'
..\bin\libkmm_mymoney.dll.a(d000887.o):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
kmymoney\CMakeFiles\kmymoney.dir\build.make:291: recipe for target 'bin/kmymoney.exe' failed
mingw32-make[2]: *** [bin/kmymoney.exe] Error 1
CMakeFiles\Makefile2:554: recipe for target 'kmymoney/CMakeFiles/kmymoney.dir/all' failed
mingw32-make[1]: *** [kmymoney/CMakeFiles/kmymoney.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
-----------------------------

Reproducible: Always

Steps to Reproduce:
1. configure - so the link.txt file is rebuilt
2. make

Actual Results:  
make fails

Expected Results:  
make succeeds
Comment 1 Ralf Habacker 2017-06-27 14:39:03 UTC
For building on Windows a few fixes are required. A related patch could be downloaded from https://build.opensuse.org/package/view_file/home:rhabacker:branches:windows:mingw:win32:kmymoney/mingw32-kmymoney/fix-windows-compile-issue.patch?expand=1