Re: [cc65] Linking problem under Mac OS X 10.5.8

From: Ullrich von Bassewitz <>
Date: 2010-08-10 13:00:10

On Tue, Aug 10, 2010 at 11:46:17AM +0200, AtariBDSM wrote:
>    I'm having difficulties in linking a simple "Hello World" program
> with CC65 under Mac OS X 10.5.8.

It would be helpful (not only for you, but in the general case) if you do also
specify the version of cc65 used. In fact, that is far more useful than
knowing the version of the operating system.

> The compilation for the following code goes successfully:
> Linking the program this way:
> ld65 -t atari -o hello.o atari.lib
> produces an error:
> Unresolved external `_text' referenced in:
>  hello.s(14)
> ld65: Error: 1 unresolved external(s) found - cannot create output file

There is no symbol named "text" in the C file you posted. This means that the
hello.o file was generated by a different hello.c file than the one you

Is it possible that the hello.c was the one from the tutorial (in the
samples/tutorial directory)? This tutorial shows how to combine assembler and
C, and the C file references a string named "text" that comes from an
assembler file. Not linking the assembler module will lead to exactly the
error you've posted. If so, please read this document:



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Aug 10 13:00:19 2010

This archive was generated by hypermail 2.1.8 : 2010-08-10 13:00:21 CEST