[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]
Bo,
sorry for the delay in answering.
At 13:11 +0000 on 14/3/01, Bo Rasmusson wrote:
> I have sent this message to both the comp.lang.tcl newsgroup and to the
> sourceforge mailing list but have not received any answers yet, so I am
> sad to say that I need to bother you again thou I know you have a lot
> of work since your new assignment regarding Tcl/Tk on Mac.
> Before I ask the question I would like to point out that you are more
> than welcome to ask me any questions about UNIX systems and/or C/C++
> coding if there is anything you need to know since that is what
> I normally work with for a living.
>
>
> Still two compiling errors remain (the second is only due to the first)
> when I try to compile the 8.3.2p1 version of Tcl/Tk:
>
> 1. Link Error: tclMacAppInit.c: 'InstallConsole' [Xpointer] referenced
> from 'main' is undefined.
>
> 2. Build of target "TclShell" in project "TclShells.pi" failed because
> a subtarget or subproject build failed.
>
> So I looked at the tclMacAppInit.c file and came to the conclusion that
> the error reside from the SIOUX.c file I changed as requested in the
> README file. I then tried to recompile the shlib's by compiling the
> target "Build All" of the project "Build.MacOS.mcp" in CW Pro 6 and I
> managed to get 3644 errors.
> 3600 of these errors where in the "fp68k_glue.c" file, 6 errors in the
> "CFString.h" file, 1 error in the "CGlue.c" file, 16 errors in the
> "SIOUX.c" file, 4 errors in the "SIOUXWindows.c" file and finally 17
> errors in the "UTBAccessors.h" file.
>
> Since I have not changed anything in CW Pro 6 except what is said in the
> README file about changes to CW, I am starting to wounder if there is
> something wrong with my installed CW. Any suggestions?
>
These are really all Metrowerks specific issues you are seeing, you
should try also raising similar problems on
comp.sys.mac.programmer.codewarrior in the future, Metrowerks is
monitoring that forum and may get prompted to update/fix their #%@*
code if enough people are complaining.
Your "InstallConsole" related link error is due to a Metrowerks bug
introduced with Pro6 that necessitates rebuilding the MSL libraries.
(as detailed in the "CW Pro6 changes" document from the MacTcl/Tk
8.3.2p1 distribution)
The "subproject build failed" error is a direct consequence of this
first problem.
Now, all the build errors you get from Build.MacOS.mcp are due to
slight changes that Apple made to the universal interfaces 3.4 series
that cause trouble with CodeWarrior library sources. If you had rebuilt
the libraries before updating your universal interfaces to 3.4 to build
Tcl/Tk 8.3.2p1, you would not have seen any of these problems.
When using the latest UniversalInterfaces3.4b5.img available from
Apple, in addition to what is mentioned in "CW Pro6 changes", I had to
change the following to get "Build All" of Build.MacOS.mcp to build
without errors:
CGlue.c:
* change the line
Boolean lclick(Point *pt, short modifiers, ListHandle lHandle)
to
Boolean lclick(Point *pt, EventModifiers modifiers, ListHandle
lHandle)
PLStringFuncsGlue.mcp:
* add {Compiler}:MSL to AccessPaths->SystemPaths in all targets
fp68k_glue.c:
* Add the following lines to the top of this file:
#include <ConditionalMacros.h>
#undef TYPE_LONGDOUBLE_IS_DOUBLE
#define TYPE_LONGDOUBLE_IS_DOUBLE 0
SIOUX.c:
* change all occurrences of
NewAEEventHandlerProc
to
NewAEEventHandlerUPP
* change all occurrences of
UInt32 refCon
to
long refCon
SIOUXWindows.c:
* change all occurrences of
NewControlActionProc
to
NewControlActionUPP
UTBAccessors.h:
* comment out the lines defining
GetWindowPortBounds
GetWindowList
GetWindowFromPor
With these changes applied, Build.MacOS.mcp builds without errors here.
If Apple make more changes to the 3.4 UniversalInterfaces in the future
(they are close to releasing a final 3.4 though), similar problems may
crop up, but they are generally not hard to fix if you read the
compiler error messages carefully.
> By the way. The reason I am trying to compile the source version of
> Tcl/Tk is because one of our Tcl/Tk programmer want me to help him to
> patch his software to the Mac (he is single handidly doing a smaller
> software for the IRIX, Windows and Mac platforms). He wants to have
> more or less a single executable and his source code hidden (for ex.
> encrypted or equal), so he told me that I needed to compile the source
> version of Tcl/Tk for Mac and then wrap up his code. Since neither I or
> he have any experiance with the Mac do you think this is the right way
> of doing it?
it depends highly on how he plans to wrap his code. if he uses some
custom method of encrypting in c or tcl, it may work on the mac, I
don't quite see why you would need to recompile Tcl/Tk for that though.
you should know that tclpro is not available on the mac at this time,
and other code wrapping/VFS type solutions are not as far along as on
the other platforms.
tclkit IS available for the mac, although I have no experience using it
on the mac myself.
certainly one solution I can imagine would be to include a tcl
encryption script in the Wish resources (a la what drag & drop tclet
does) and get that script to read & decrypt your encrypted code from
the resources as well.
see the docs for the -rsrc option to source and the mac specific
resource command for more on that.
you might want to consult the c.l.t archives and the MACTCL archives
for more on these subjects, they have come up in the past.
Hope this helps
Cheers,
Daniel
|