[cc65] Segment EXEHDR does not exist - while using ld65 directly

From: Jakub <debski.jakub1wp.pl>
Date: 2009-07-07 16:59:49
Hi,

I'm using CC55 V2.12.0.

When I try to link some code with ld65 I receive "Segment EXEHDR does not exist" error.
However it works when I use cl65 tool.

Example - test.c:

#include <stdio.h>
int main(void)
{
  for (;;) { printf("Test\n");  };
  return 0;
}

Test 1:
cl65 -Osir -t atari -o test1.xex test.c

works fine.

Test 2:
cc65 -T -Osir --cpu 6502 -t atari test.c 
ca65 -l -t atari test.s
ld65 -t atari test.o atari.lib -o test2.xex
ld65.exe: Warning: [builtin config](15): Segment `EXEHDR' does not exist
ld65.exe: Warning: [builtin config](25): Segment `AUTOSTRT' does not exist

What is strange after adding function call without a prototype (which generates warning) it works:

#include <stdio.h>
int main(void)
{
  printf("Test\n");
  exit(0); // <- without a prototype. xex file is generated fine!
  return 0;
}

C:\cc65-test>cc65 -T -Osir --cpu 6502 -t atari test3.c
test3.c(6): Warning: Function call without a prototype
C:\cc65-test>ca65 -l -t atari test3.s
C:\cc65-test>ld65 -t atari test3.o atari.lib -o test3.xex

Tests are available here:
http://www.alamak0ta.republika.pl/cc65-test.zip

Can anyone help?

regards,
Jakub

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Jul 7 16:59:59 2009

This archive was generated by hypermail 2.1.8 : 2009-07-07 17:00:02 CEST