2

I try to call in a Tcl script:

load tclmagick.dll

and get

couldn't load library "TclMagick.dll": invalid argument

I've tried the Dependency Walker, which tells me that the msvcrt.exe doesn't export a function named "__adjust_fdiv". However, I have no clue how to fix that. Any advice?

OS: Windows 7, 64bit
packages: TclMagick and ImageMagick

Michael
  • 1,464
  • 1
  • 20
  • 40
  • 1
    Excellent question. Could you add what `parray tcl_platform` reports to your question, and also say where you got your Tcl installation from? Thanks! – Donal Fellows Feb 27 '13 at 05:18
  • tcl_platform(byteOrder) = littleEndian tcl_platform(machine) = intel tcl_platform(os) = Windows NT tcl_platform(osVersion) = 6.1 tcl_platform(platform) = windows tcl_platform(pointerSize) = 4 tcl_platform(threaded) = 1 tcl_platform(user) = michir tcl_platform(wordSize) = 4 – Michael Feb 27 '13 at 18:16
  • The Tcl installation is from AktiveState – Michael Feb 27 '13 at 18:18
  • I suppose it's `msvcrt.dll` which doesn't export `__adjust_fdiv`, right? Could you copy and paste its file version? (Available in the Properties dialog of the Windows Explorer context menu on a DLL file.) – kostix Feb 28 '13 at 00:16
  • Also, are you using 32-bit installation of ActiveState Tcl? I'm not sure 64-bit Windows 7 ships a 64-bit version of `msvcrt.dll` (that is, without any integer suffix like in `msvcr80.dll`), but if it does I would not be surprised to not see `__adjust_fdiv` in it as this code related to messing with FP operations of older Pentiums from 90-s. So you might need to seek for 32-bit `msvcrt.dll` (under `C:\Windows\SysWOW64` supposedly). – kostix Feb 28 '13 at 00:20
  • I use the 32-bit version of ActiveState Tcl (in fact I have them both installed). I will check out the msvcrt.dll – Michael Feb 28 '13 at 09:10
  • I found two msvcrt.dll: in system32 (620kB, 64bit) and in SysWOW64 (674kB, 32bit) both version 7.0.7601.17744; the 32bit version has the "__adjust_fdiv" in the export list the 64bit version doesn't have it – Michael Feb 28 '13 at 20:53
  • @DonalFellows do you have any ideas in the light of these new upates? My own C-fu is unfortunately lacking to help the OP further :-( – kostix Mar 03 '13 at 19:00

0 Answers0