Subject: Re: Package DLLs with Visual C++ 6.0 - DN [1]
Anders Nygren <nygren@ucalgary.ca> - 09 Oct 1999 - comp.lang.tcl
Bill Schongar wrote:
>
> Anders Nygren wrote:
>
> >I have an application consisting of Tcl/Tk8.2 + BLT2.4j extended with my own C++
> >code. It works fine if I use static linking, but I would prefer to use a DLL and
> >load my extensions dynamically with "package require".
>
> ...
>
> If your DLL loads correctly with the 'load' command, then it's not a compiling
> issue, but rather a pkg_mkIndex issue. Double check that it functions as
> expected when loaded directly - if not, hunt down the 'example' library source
> from Scriptics or Neosoft.
>
> Typically when I build a package for windows, I do this:
>
> - Make a directory named after the package and version name (foo1.2)
> - CD into the dir above that one
> - Run pkg_mkIndex on that subdirectory ('pkg_mkIndex foo1.2')
> - Zip up the subdirectory and send it out. People install it to their
> Tcl (or Tk) library path, and use it as necessary ('package require foo')
Finally got it to work. Turns out the problem wasn't how I was compiling my DLL
(compiling with Microsofts default settings for a "Win32 Dynamic-link library",
followed by Bill's approach above, works fine). A third-party DLL needed by the
code in my DLL wasn't on the path when I tried to run pkg_mkIndex. Didn't
realize that pkg_mkIndex needs to load everything, although it only (?) calls
the xyz_Init function.
Thanks Bill for your input.
-Anders
Last modified
1999-10-19
1999-10-19
(195.108.246.51)
Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated
