Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Massive compiling errors in 10.3 on a program that previously worked

Massive compiling errors in 10.3 on a program that previously worked
Thread Tools
Mac Enthusiast
Join Date: Apr 2001
Location: Newton, MA, USA
Status: Offline
Reply With Quote
Dec 1, 2003, 09:32 PM
 
Okay, i know i only ask dumb questions in here, but this is absolutely driving me crazy.

I had a reasonably complex program in 10.2 that compiled fine (12 warnings (well, twelve of the same warning), but i strongly doubt they're behind this).

and now, after revisiting it in 10.3, it's got 108 errors. which is madness. the majority of them claim that variables are not declared. which of course they are.

here's a sampler:

MyDocument.m:200: parse error before `*'
MyDocument.m:206: `majorWordRange' undeclared (first use in this function)
MyDocument.m:282: parse error before `int'
MyDocument.m:301: `curfloatx' undeclared (first use in this function)

only one class out of five fails in this manner. the rest are okay; i tried restoring it from backup, and commenting out humongous portions. so, has anyone else run into this, or is there anything that might cause this? i literally haven't touched it since may, so i'm really at a loss. am i on crack?

thanks much...
     
Mac Enthusiast
Join Date: Jan 2001
Status: Offline
Reply With Quote
Dec 1, 2003, 11:02 PM
 
Don't really know from what you've said, but I also had massive compiling errors under XCode. This was attibuted to having a .c file include something that included something that was a .m. Renaming all my .c's to .m's fixed it up... not sure if that's what's wrong in your case though.
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Dec 2, 2003, 12:04 AM
 
I had a similar problem that resulted from Xcode not importing my project right and missing one of the header files. Don't know if that's got anything to do with this, but I thought it was worth mentioning.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Dec 2, 2003, 08:45 AM
 
It could be that you were previously using gcc 2.95 or 3.1 and are now using 3.3. Try using the old gcc and see if that is the problem.

Code:
[dshaw@flybook ~] gcc2 -v Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs Apple Computer, Inc. version gcc-938, based on gcc version 2.95.2 19991024 (release) [dshaw@flybook ~] gcc3 -v Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs Thread model: posix Apple Computer, Inc. GCC version 1256, based on gcc version 3.1 20021003 (prerelease) [dshaw@flybook ~] gcc -v Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs Thread model: posix gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
K++
Senior User
Join Date: Jan 2002
Location: NYC
Status: Offline
Reply With Quote
Dec 2, 2003, 11:32 AM
 
Originally posted by Arkham_c:
It could be that you were previously using gcc 2.95 or 3.1 and are now using 3.3. Try using the old gcc and see if that is the problem.

Code:
[dshaw@flybook ~] gcc2 -v Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs Apple Computer, Inc. version gcc-938, based on gcc version 2.95.2 19991024 (release) [dshaw@flybook ~] gcc3 -v Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs Thread model: posix Apple Computer, Inc. GCC version 1256, based on gcc version 3.1 20021003 (prerelease) [dshaw@flybook ~] gcc -v Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs Thread model: posix gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
This is impossible simply because no Apple tools by default will touch 2.95 since it has near no PPC optimizations and no AltiVec whatsoever. Even as early as 10.0 the Apple tools all used GCC3.

As for the compilation problem, clean the target and build again. Xcode has issues with Precompiled headers AFAIK. If that still doesn't work, then it's because the compiler had gotten older and wiser, and some of the things your doing just don't fly anymore.

Like if you want you could post aportion of your code with the error, and we could take a look at it since I don't see any reason outside of building clean that it should not compile.
     
Mac Enthusiast
Join Date: Apr 2001
Location: Newton, MA, USA
Status: Offline
Reply With Quote
Dec 2, 2003, 01:51 PM
 
Cleaning was one of my first suspicions, but that didn't help. And yeah, it definitely occurred to me that i may have been using some sketchy technique, and it just dawned on me now what that was. i knew it was sloppy, but i didn't think it was that grievous a crime.
I had been declaring a lot of things just before i'd used them, like, in the middle of a function. I noticed finally that each of the variables showing up as 'undeclared' fit this description, and after moving them (which i'd intended to go back and do anyway, for readability's sake), it's happy now.

So i guess this is project builder's way of telling me i suck. but for once, i'm way ahead of it on that score

thanks...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:29 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2