Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / January 2004



Tip: Looking for answers? Try searching our database.

CW 8.3/Panther/Xcode internal linker errors

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nigel Spon - 08 Jan 2004 23:26 GMT
I'm trying to compile a small Mach-O app under 10.3 which used to work
until I made the mistake of installing the XCode developer tools. Even
after following the helpful hints about switching the source tree to the
10.2.7 folder, patching limits.h, and adding empty definitions for
__dead2 and __pure2 to my prefix file (why doesn't the code in
sys/cdefs.c work when it does this?), I now get:

Link Error   : Internal Linker Error File 'MachODylibs.c' Line 656 could
not read dylib

Does anyone have any idea what might cause this?

Much obliged,

Signature

"Supreme executive power derives from a mandate from the masses, not some
farcical aquatic ceremony"

Nigel

MW Ron - 09 Jan 2004 02:59 GMT
>I'm trying to compile a small Mach-O app under 10.3 which used to work
>until I made the mistake of installing the XCode developer tools. Even
[quoted text clipped - 5 lines]
>Link Error   : Internal Linker Error File 'MachODylibs.c' Line 656 could
>not read dylib

An Internal linker error would be our bug not yours.   Sometimes these
will come up if the precompiled header is wrong.

I don't think the dead2 and pure2 were necessary they were if you had
the wrong sdk or something... I didn't have to do that.

I'd suggest you start all over... following these directions.  install
CW 8,  update to 8.2  update to 8.3

rebuild all libraries and precompiled headers

Get the XCode Tools CD,  reinstall it, choose the optional packages  and
there is a 10.2.7 SDK  install that,  you can do this even after doing
the original installation.

In CodeWarrior 8.3  global Preferences...
change your Source Tree for OS X Volume
from
/
to
/Developers/SDKs/MacOSX10.2.7SDK/

Then... this is an unofficial and non-supported fix.  Since it involves
changing Apple's header

In Apple's Limits.h
in /Developers/SDKs/MacOSX10.2.7SDK/usr/include/ppc/limits.h

Change

#ifndef _PPC_LIMITS_H_
#define _PPC_LIMITS_H_

#define    CHAR_BIT    8        /* number of bits in a char */
#define    MB_LEN_MAX    6        /* Allow 31 bit UTF2 */

#define    CLK_TCK        100        /* ticks per second */

to

#ifndef _PPC_LIMITS_H_
#define _PPC_LIMITS_H_

#define    CLK_TCK        100        /* ticks per second */

#if !_MSL_USING_MW_C_HEADERS

#define    CHAR_BIT    8        /* number of bits in a char */
#define    MB_LEN_MAX    6        /* Allow 31 bit UTF2 */

At the end of the file add
#endif  /* _MSL_USING_MW_C_HEADERS */
before
#endif /* _PPC_LIMITS_H_ */

Rebuild the precompiled headers and rebuild the MSL Mac OS X libraries

You should be OK  Let me know if you aren't...  an example project that
demonstrates this would be great.

Ron

Signature

Metrowerks, maker of CodeWarrior   -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>

Nigel Spon - 11 Jan 2004 23:41 GMT
> I'd suggest you start all over... following these directions.  install
> CW 8,  update to 8.2  update to 8.3

I tried reconstructing the project based on the Mach-O stationery and
that has done the trick, it now builds. There are a number of minor
differences in the settings between the new project and the old one, I'm
not sure which (if any) caused the problem. But it was quicker than
reinstalling CW...

Thanks,

Signature

"Supreme executive power derives from a mandate from the masses, not some
farcical aquatic ceremony"

Nigel

Martiin Gregory - 10 Jan 2004 20:35 GMT
> I'm trying to compile a small Mach-O app under 10.3 which used to work
> until I made the mistake of installing the XCode developer tools. Even
[quoted text clipped - 9 lines]
>
> Much obliged,

I was getting the exact same link error, so having to get on with
working, I switched development to my laptop for a few days, which has
not been "XCoded".  Today I came back to the project on the desktop
machine and the link error is no more.  The things that could have
made a difference:
I have rebooted the machine.
I made a project file in the trial version of CW9, using the same
source folder and could not build that either (cannot find
"balloons.h" and problems with scsi headers that no longer exist).
I touched and rebuilt the precompiled header for the CW8 project after
having tried compiling in CW9.

I have not done any other CW or dev tools re-installation or software
updates.  Somehow CW8.3 got itself in a twist and now is ok again, so
I cannot offer a reproducible example, but I did have the symptom for
a while. If I think of anything else that might have made a difference
I will post it.

--Martin Gregory
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.