in reply to Problem installing TK module

PS E:\Tk-804.033.tar\Tk-804.033\Tk-804.033> dmake cd pTk && dmake DEFINE="" dmake.exe: Warning: -- Target [pTk\libpTk.a] was made but the time st +amp has not been updated. dlltool --def Tk.def --output-exp dll.exp g++ -o blib\arch\auto\Tk\Tk.xs.dll -Wl,--base-file -Wl,dll.base -mdll +-s -L"E:\perl\lib\CORE" -L"E:\c\lib" Tk.o chnGlue.o encGlue.o evtGlue.o objGlue.o tixGlu +e.o tkGlue.o tkGlue_f.o tkWin32D ll.o pTk\tkres.o pTk/libpTk.a "E:\perl\lib\CORE\libperl520.a" -lmo +ldname -lkernel32 -luser32 -lgdi32 -lwinspool -lco mdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2 +_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -l comctl32 dll.exp pTk/libpTk.a(tkWinX.o):tkWinX.c:(.text+0xc78): undefined reference to +`ImmGetContext' pTk/libpTk.a(tkWinX.o):tkWinX.c:(.text+0xc9d): undefined reference to +`ImmSetCompositionWindow' pTk/libpTk.a(tkWinX.o):tkWinX.c:(.text+0xca8): undefined reference to +`ImmReleaseContext' pTk/libpTk.a(tkWinX.o):tkWinX.c:(.text+0x1744): undefined reference to + `ImmGetContext' pTk/libpTk.a(tkWinX.o):tkWinX.c:(.text+0x176e): undefined reference to + `ImmGetCompositionStringA' pTk/libpTk.a(tkWinX.o):tkWinX.c:(.text+0x17bb): undefined reference to + `ImmGetCompositionStringW' pTk/libpTk.a(tkWinX.o):tkWinX.c:(.text+0x18d1): undefined reference to + `ImmReleaseContext' pTk/libpTk.a(tkWinX.o):tkWinX.c:(.text+0x18e1): undefined reference to + `ImmGetCompositionStringW' pTk/libpTk.a(tkWinX.o):tkWinX.c:(.text+0x18f1): undefined reference to + `ImmGetCompositionStringA' E:/c/bin/../lib/gcc/x86_64-w64-mingw32/4.8.3/../../../../x86_64-w64-mi +ngw32/bin/ld.exe: pTk/libpTk.a(tkWinX.o): bad relo c address 0x28 in section `.data' E:/c/bin/../lib/gcc/x86_64-w64-mingw32/4.8.3/../../../../x86_64-w64-mi +ngw32/bin/ld.exe: final link failed: Invalid opera tion collect2.exe: error: ld returned 1 exit status dmake.exe: Error code 129, while making 'blib\arch\auto\Tk\Tk.xs.dll'

Replies are listed 'Best First'.
Re^2: Problem installing TK module
by syphilis (Archbishop) on Mar 31, 2015 at 23:32 UTC
    undefined reference to `Imm ...

    You need to link to libimm32.a (which should ship with strawberry).
    I don't know why this is isn't happening automatically for you. (It happened automatically for me.)

    UPDATE: I think I identified the wrong Makefile in what follows. It's the top level Makefile (not the the pTk/Makefile) that's failing to provide the libimm32.a link.

    If you go into your Tk build directory, and open up the pTk/Makefile, you should find EXTRALIBS and LDLOADLIBS entries about a third of the way down - and those entries should specify the full path to (among other libs) libimm32.a.
    If that lib is missing, just insert it at the beginning.
    For example, my EXTRALIBS and LDLOADLIBS begin with:
    "C:\_64\strawberry5.20.0\c\x86_64-w64-mingw32\lib\libimm32.a"

    If you fix those entries, you should then be able to 'cd' into the 'Tk' build directory and run 'dmake test' followed by 'dmake install' ... and that will hopefully work.

    However, the fact that this didn't all happen correctly in the first place might indicate that there's something more serious. See how it goes.

    Cheers,
    Rob
      That worked! Thanks Rob. I appreciate your help.