Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Anyone get Mac TK to compile????

0 views
Skip to first unread message

Steven Buhr

unread,
Sep 27, 1995, 3:00:00 AM9/27/95
to
I'm trying to compile up the TK application on the macintosh. I want to
write a c user interface using the tk widgets. I gather from the books
and looking at the code for TK, that to use the widgets in c you modify
tkMacMain.c to run any given scripts, is this assumption correct?? But
I can't get TK to compile at all with CW 1.2.2, GUSI 1.60j etc. with the
huge file from ftp.alucat.com. I get the following link errors

Link Error : fp68k_glue.c: 'acos' 16-bit data reference to 'errno' is
out of range.

Link Error : fp68k_glue.c: 'asin' 16-bit data reference to 'errno' is
out of range.

Link Error : fp68k_glue.c: 'log' 16-bit data reference to 'errno' is
out of range.

Link Error : fp68k_glue.c: 'log10' 16-bit data reference to 'errno' is
out of range.

Link Error : fp68k_glue.c: 'pow' 16-bit data reference to 'errno' is
out of range.

Link Error : fp68k_glue.c: 'sqrt' 16-bit data reference to 'errno' is
out of range.

I looked up this error in the CW documentations and is says that errno
might be out of the 32K bounds. I moved the supposedly offendly partys
closer, but with no luck. Any help would be greatly appreciated, thanks
in advance.

Steve Buhr
ARTomation
91 N. Main Street
Chagrin Falls, OH 44022 USA
Phone:[216]247-9209 Fax:[216]247-9210

Jay Lieske Jr.

unread,
Sep 27, 1995, 3:00:00 AM9/27/95
to
In article <44cc0o$g...@antares.en.com>, Steven Buhr <sb...@en.com> wrote:

> I can't get TK to compile at all with CW 1.2.2, GUSI 1.60j etc. with the
> huge file from ftp.alucat.com. I get the following link errors
>
> Link Error : fp68k_glue.c: 'acos' 16-bit data reference to 'errno' is
> out of range.

There is more that 32K of global data in the project, so accesses to data
need to use 32-bit, not 16-bit offsets. You'll need to set the "far data"
preference for your project. This is distinct from the size of your
segments, which is affected by the large/smart/small code model. It may
be affected by the order of files in your project.

Setting "far data" may fix the problem enough for you. And you may be
able to put the offending libraries (ANSI and MathLib68K) at the top of
your project so that errno appears earlier in the global data table.

But you will probably need to recompile MathLib68K with "far data" on for
this project. It's not too hard -- unlike the ANSI library, the MathLib
source code is in the :Libraries:MacOS 68K:MathLib68K folder. You can
duplicate the MathLib68K.A5.ź project, change its preferences to Far Data
and make it create a new library like MathLib68K FD(4i).A5.Lib, which you
can then include in your project.

As for me, I was able to recompile Tcl-68k.lib pretty easily in CW7, which
came out last week. I compiled with Far Data, Smart Model, 4-byte ints,
native doubles, PowerPC struct alignment, and linked with the new Far
Everything libraries.

You might join the mactcl mail list by sending a message with the line
SUBSCRIBE MACTCL your name
to <list...@sunlabs.eng.Sun.COM>. People are talking about the port
there also...


--jay

___________________________________________________
Jay Lieske Jr. <lie...@princeton.edu>
Science and Engineering Specialist (609)258-6050
Computer and Information Technology fax 258-3943
Princeton University, Princeton, NJ 08544
http://www.princeton.edu/~lieske/

Jack Jansen

unread,
Sep 28, 1995, 3:00:00 AM9/28/95
to
Steven Buhr <sb...@en.com> writes:

>I'm trying to compile up the TK application on the macintosh. [...]


>I can't get TK to compile at all with CW 1.2.2, GUSI 1.60j etc. with the
>huge file from ftp.alucat.com. I get the following link errors

>Link Error : fp68k_glue.c: 'acos' 16-bit data reference to 'errno' is
>out of range.

This is a bug in CodeWarrior 6, for which a patch is available on the
MetroWerks WWW and FTP sites. The problem is that the math library
(and also Sioux, I think) wasn't compiled with far data as it was
distributed. The patch contains the fixed libraries.
--
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack....@cwi.nl | ++++ if you agree copy these lines to your sig ++++
http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm

0 new messages