Is it a linker error or a compilation error? I get that linker error if I don't link against the MacTraps library. Did you link against the MacTraps library?But in TC6 I still get the build error (undefined: thePort).
Is it a linker error or a compilation error? I get that linker error if I don't link against the MacTraps library. Did you link against the MacTraps library?But in TC6 I still get the build error (undefined: thePort).
It is a linker error, but MacTraps is there...Is it a linker error or a compilation error? I get that linker error if I don't link against the MacTraps library. Did you link against the MacTraps library?
Side note:It is a linker error, but MacTraps is there...
View attachment 9184
i've actually caused an error when i tried to do both(on accident, i didn't understand this feature at the time) Think C will think i'm trying to link the same resource file twice and yell at me.you don't need to link your resource file manually in the project linker window at all like is seen here. Think C will connect it for you.
I have tried running it from within THINK C with the same results. I have Macsbug on my 6.0.8 image which also crashes the same way. I still need to get it installed to my 7.5.5 image though so I'll do that later today.Normally that happens when you use Color QuickDraw, but you don’t appear to be doing that here (ForeColor/BackColor don’t count).
Have you tried running this under THINK C on an SE, rather than just running the complied app? If you run it in the THINK C environment (check “Use Debugger” first), it should drop into Lightsbug and tell you where this error is happening.
Or install Macsbug (which you should do anyway if you are developing Mac programs) and post a screenshot of what it shows you during the crash here.
Just tried removing the non-black/white colors from the code & it still crashes the same way.I noticed colors on emulated Mac II but crashed on emulated SE, which makes me wonder if there wasn't a way to handle if colors were not supported, especially on SE, Plus, and the other compact Macs that can't process color.
Running this from within THINK C on the SE runs out of memory which is why I was compiling it to a binary first.Have you tried running this under THINK C on an SE, rather than just running the complied app? If you run it in the THINK C environment (check “Use Debugger” first), it should drop into Lightsbug and tell you where this error is happening.
If you have Macsbug properly installed and running you should never see that type of crash. Any system bomb for example “illegal instruction” should always drop into Macsbug instead. Double check that Macsbug 6.x is in your System Folder and that you are seeing “Macsbug installed” under “Welcome to Macintosh” during startup. If not, something is wrong with your copy of Macsbug.I have tried running it from within THINK C with the same results. I have Macsbug on my 6.0.8 image which also crashes the same way. I still need to get it installed to my 7.5.5 image though so I'll do that later today.
@superbenk is only using the legacy ForeColor and BackColor routines, which only support 8 colors but were present from day one and should work fine on an SE (or Plus, or 128k). You are correct that Color QuickDraw generally is not supported on an SE, so he could not for example call RGBForeColor … but his code doesn’t appear to be doing this, so it’s not clear to me immediately why he’s getting this crash. MacsBug will provide the answer.I noticed colors on emulated Mac II but crashed on emulated SE, which makes me wonder if there wasn't a way to handle if colors were not supported, especially on SE, Plus, and the other compact Macs that can't process color.
Ah, I'll check that.OH @superbenk make sure you aren’t compiling with 68020 instructions enabled. Look under edit/preferences in the “THINK C” drop-down and ensure that checkbox is unchecked.
Aha!OH @superbenk make sure you aren’t compiling with 68020 instructions enabled. Look under edit/preferences in the “THINK C” drop-down and ensure that checkbox is unchecked.
Yes this got me once too -- it came on seemingly on its own when I was working and bouncing between an SE and an SE/30. Glad you + @Crutch figured it out!