Alan W. Irwin wrote:
>> 2. Due to some problem in determining the build parameters
>> via the CMake module FindTclsh, I simply set the parameter
>> TCL_TCLSH to "tclsh". This is not very nice, but it was an
>> easy hack. **TODO: find out if "tclsh" is present **
> I strongly prefer that INCLUDE(FindTclsh) continue to be used. Please
> a look at the CMake module FindTclsh.cmake which is extremely simple.
The problem I had noticed before when I used INCLUDE(FindTclsh) is most
problem I have seen from time to time, but which is not at all related
to that module:
- I remove the cache file in the root directory to get CMake to
- When it reaches the subdirectories it complains it can not remove the
- When I rerun CMake (again removing the cache file in the root), the
This does not happen all the time, which makes it a rather bizarre
For the moment I choose to ignore it. And put back the INCLUDE.
>> While this enabled the CBS to build the library, I can not run the
>> examples yet - pltcl.exe can not properly initialise itself due to
>> a lack of initialisation files and the location of the PLplot library.
>> This will require some further investigation, but I am too thrilled
>> about what I have achieved so far, to first sort out all odds and ends.
> I am also thrilled that your CBS and source code changes make it
> possible to
> build the plplottcltk library on windows. Good luck in figuring out
> how to
> actually use that library on windows. Assuming that it is shared, do you
> have to make some PLDLLIMPEXP changes?
It has indeed everything to do with exports/imports:
[ 1%] Built target csirocsa
[ 2%] Built target plhershey-unicode-gen
[ 3%] Built target plhershey-unicode.h_built
[ 39%] Built target plplotd
[ 39%] Built target pkgIndex.tcl
[ 40%] Built target plplotcxxd
[ 40%] Built target plplot.tcl_target
[ 42%] Built target tclmatrixd
Linking C shared library plplottcltkd.dll
tclAPI.obj : error LNK2001: unresolved external symbol _plplotLibDir
tclAPI.obj : error LNK2001: unresolved external symbol _plstrdup
tclAPI.obj : error LNK2001: unresolved external symbol _plInBuildTree
tclAPI.obj : error LNK2001: unresolved external symbol _plsc
tclAPI.obj : error LNK2001: unresolved external symbol _Tcl_GetMatrixPtr
Some of these are simply functions that need to be exported in the
PLplot library itself, but there is also plsc - a global variable.
I am not sure how I can export global variables, but I will inquire
(The issue will arise with other language bindings too, as they also
have DLLs that use the PLplot DLL. Most probably there will be
more exports needed.)
plplottcltkd.dll : fatal error LNK1120: 5 unresolved externals