Compiling TCom

jbr - 2012-03-20 I have been trying to compile the tcom extensions with no success.

It should be understood that I have little or no experience on Windows.

I started by checking out the source from a git repository here . I installed ActiveTcl, CMake and Visual C++ 2008 as instructed by the When trying to build the project created by cmake, the git sources seem to be missing "version.h" and "buildNumber.h". I stole these files from the 3.9 zip file on Chin Huang's site. I had to add an include directive to the *.rc files for "buildNumber.h". The project then builds without erros but the package does not work. A test script hangs at "package require tcom". Also, the dll files are very large and not comparable to the distributed binaries.

[email protected] : ls -l 
total 2072
-rw-r--r--  1 john  john     114 Mar 19 19:29 pkgIndex.tcl
-rw-r--r--  1 john  john  562176 Mar 19 19:29 tcom.dll
-rw-r--r--  1 john  john    4220 Mar 19 19:29 tcom.tcl
-rw-r--r--  1 john  john  244736 Mar 19 19:29 tcominproc.dll
-rw-r--r--  1 john  john  236032 Mar 19 19:29 tcomlocal.exe

Any help would be appreciated.

Thanks, John

jbr - Much later (2012-05-03) I found a switch in MSVC++ "Optimize over entire executable" or something to that effect that is not the default in release builds and was not present or not converted from the provided project files (for and earlier version of MSVC++). The switch causes unused code to be removed from the output. This results in files of the expected sizes. The tar file from 3.9 seems to work as expected and I was able to make the modifications that I needed.

PT: MSVC discriminates between debug builds and release builds. The published files are likely a release build so optimized and stripped and linked to the optimised version of the C runtime. Debug builds run significantly slower but provide more information about errors and the runtime performs bounds checking on memory accesses and so on. In the released version of tcom (without CMake) you'd open the solution file, select the release build and possibly adjust the path to Tcl in the project settings for Preprocessor includes and the Linker library imports. For CMake - you will have to fork and fix this yourself or contact the owner of that repository. These files (version.h and buildNumber.h) are not part of the normal tcom sources.

jbr - The git repository that I cloned appears to be the latest source for tcom. Can you suggest an alternative source distribution? Thanks. PT - The primary author is cthuang [1 ]

jbr - No kidding? And pukkaone is Chin Huang and it's his git repository and it doesn't work out of the box and I'm sorry asked for help.

These files (version.h and buildNumber.h) are in the 3.9 zip file so I'm confused as to why you claim otherwise. I'll ask again since you seem to have some other source code that doesn't include these files. Where can I get it?

I've tried to build the 3.9 zip file distribution but it dies with a message like:

 .\tcomVersion.rc(2) : fatal error RC1015: cannot open include file 'winres.h'.

on each of the four projects. I cannot find the file winres.h anywhere on my disk. Oh well.