Bug 184049

Summary: Link error when compiling kdepim on Windows
Product: [Applications] kleopatra Reporter: Keith Barber <barberk7>
Component: generalAssignee: Marc Mutz <mutz>
Status: RESOLVED FIXED    
Severity: normal CC: aheinecke, kdepim-bugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description Keith Barber 2009-02-11 21:12:14 UTC
Version:            (using KDE 4.2.0)
Compiler:          msvc2008 
OS:                MS Windows
Installed from:    Compiled From Sources

When building kdepim on Windows XP using emerge, compilation fails when linking kleopatra.exe.  There were two undefined references: one to something in libgpg-error and one in libgpg. 

Sorry, don't have the exact error message anymore, but here's the command that was caused the error:

C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe /nologo @CMakeFiles\kleopatra_bin.dir\objects.rsp /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR -wd4250 -wd4251 -wd4396 -wd4661 -EHsc /MD /Zi /O2 /Ob1 /D NDEBUG -DQT_NO_DEBUG /Fe..\bin\kleopatra.exe /FdC:\kderoot\tmp\kdepim-20080202\work\msvc2008-RelWithDebInfo\bin\kleopatra.pdb -link /implib:..\bin\kleopatra.lib /version:0.0 /MANIFEST /STACK:10000000 /machine:I386 /debug /INCREMENTAL:YES /NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt /subsystem:windows -LIBPATH:C:\kderoot\lib -LIBPATH:C:\kderoot\tmp\kdepim-20080202\work\msvc2008-RelWithDebInfo\bin C:\kderoot\lib\qtmain.lib C:\kderoot\lib\Qt3Support4.lib ..\bin\kleo.lib C:\kderoot\lib\qgpgme.lib C:\kderoot\lib\gpgme++.lib C:\kderoot\lib\kdeui.lib C:\kderoot\lib\kmime.lib C:\kderoot\lib\kutils.lib C:\kderoot\lib\kdeui.lib C:\kderoot\lib\QtSvg4.lib C:\kderoot\lib\kdecore.lib C:\kderoot\lib\QtDBus4.lib C:\kderoot\lib\QtCore4.lib C:\kderoot\lib\kdewin32.lib user32.lib shell32.lib ws2_32.lib netapi32.lib userenv.lib C:\kderoot\lib\QtGui4.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFESTFILE:..\bin\kleopatra.exe.intermediate.manifest ..\bin\kleopatra.exe.embed.manifest.res

I added the following to libraries to the linker and it compiled fine: C:\kderoot\lib\libgpg-error-0.lib C:\kderoot\lib\libgpgme-11.lib

To fix the problem in emerge, I added the following to "target_link_libraries" in c:/kderoot/svn/trunk/KDE/kdepim/kleopatra/CMakeLists.txt: 

c:/kderoot/lib/libgpgme-11.lib c:/kderoot/lib/libgpg-error-0.lib

I know they should actually be variables, but I'm not familiar with how emerge and cmake handle them.

Thanks!
Comment 1 Andre Heinecke 2013-04-30 09:29:13 UTC
Currently kleopatra / kdepim builds for KDE/4.10 and master with emerge (both mingw and msvc). So this has been resolved at some point.