It is currently Thu Nov 14, 2019 6:09 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Problem with ld65
PostPosted: Sat Jun 22, 2019 7:38 pm 
Offline

Joined: Sat Jun 22, 2019 6:45 pm
Posts: 1
Hi everyone, I'm new to programming and compiling on the 6205, but I've encountered a problem.

When trying to convert an object file to a .nes file the following error comes up.

Code:
ld65: Warning: c:\6205\cfg/nes.cfg(64): Segment 'HEADER' does not exist
ld65: Warning: c:\6205\cfg/nes.cfg(64): Segment 'STARTUP' does not exist
ld65: Warning: c:\6205\cfg/nes.cfg(64): Segment 'VECTORS' does not exist
ld65: Warning: c:\6205\cfg/nes.cfg(64): Segment 'CHARS' does not exist


I checked the nes.cfg file and I saw nothing out of the ordinary. The segments do seem to have the names that the error says don't exist. Either way, the only thing on line 64 is a blank space. I'm pretty much stumped, so if anyone can help that would be much appreciated :) .


Top
 Profile  
 
 Post subject: Re: Problem with ld65
PostPosted: Sun Jun 23, 2019 3:02 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 4213
Location: A world gone mad
1. It's 6502, not 6205. No offense intended, but the least you could do is get the number of the CPU you're developing for right... :-) Even your pathnames have the architecture wrong, so this is not a typo...

2. Provide the following things:

* The .asm source code, preferably in a code block
* The .cfg file, preferably in a code block
* The exact commands you're using to run the assember and linker
* Output from ca65 --version and ld65 --version

3. Are you sure you're using the correct slashes for the platform/OS you're running ca65/ld65 on? I see a mix of / (*IX systems) and \ (DOS/Windows), though this could be a ca65/ld65 quirk.


Top
 Profile  
 
 Post subject: Re: Problem with ld65
PostPosted: Sun Jun 23, 2019 9:28 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7628
Location: Canada
Are you trying to link an empty object file?

Unless a segment is declared in the .CFG file with "optional=yes" it must appear at least once in one of the objects you are linking. In the assembly, using a segment looks like this:

Code:
.segment "HEADER"
; code for header goes here

.segment "CHAR"
; code for CHR tiles goes here

; etc.


The segment can even be empty, but it must be referenced somewhere by one or more of the objects or the linker will give these errors.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group