Difficulties with XA during compilation

Questions, bug reports, features requests, ... about the Oric Software Development Kit. Please indicate clearly in the title the related element (OSDK for generic questions, PictConv, FilePack, XA, Euphoric, etc...) to make it easy to locate messages.

Post Reply
User avatar
coco.oric
Flight Lieutenant
Posts: 426
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Difficulties with XA during compilation

Post by coco.oric » Tue Sep 05, 2017 5:58 am

Dear all,

I've some troubles to compile several source files to create a datafile. OSDK gives the feedback that i've some errors on labels

Here is the code which include some files :
It's the main file with some define.

Code: Select all

;------------------------------------------------------------------------------
	.word	0,tblGame				; 01 - 00 - les paramètres du jeu
	.word	0,tblDirections			; 02 - 02 - les directions autorisées dans chacune des pièces
....
#include	"fr_data.s"
#include	"fr_dico.s"
...
and for example a part of the fr_dico.s file (it seems that the fist fr_data.s is fine) :

Code: Select all

tblDictionnaire
	.word	tblD0
	.word	tblD1
	.word	tblD2
	.word	tblD3
	.word	tblD4
	.word	tblD5
	...	
	tblDictionnaireEnd

tblD0
	.asc	7,"bonjour"
;	.asc 	7,"Bonjour"
tblD1
	.asc 	7,"allumer"
	.asc 	6,"allume"
	...
tblD2
	.asc 	5,"crier"
	.asc 	4,"crie"
tblD3
	.asc 	7,"armoire"
	.asc 	8,"penderie"
tblD4
	.asc 	7,"arreter"
	.asc 	6,"arrete"
tblD5
	.asc 	8,"attendre"
	...
But i've some errors in the compilation.

With the error file (part of) :

Code: Select all

Cross-Assembler 65xx V2.2.5 (13:39:57 / Apr 13 2017) 
(c) 1989-98 by A.Fachat
65816 opcodes and modes coded by Jolse Maginnis
Oric C adaptation and debugging by Mickael Pointier
Clean Linux port by Jean-Yves Lamoureux

tblDictionnaire
fr_dico.s(23):  3365:Label defined error
tblDictionnaireEnd
fr_dico.s(125):  342f:Label defined error
tblD0
fr_dico.s(127):  342f:Label defined error
tblD1
fr_dico.s(130):  3437:Label defined error
tblD2
fr_dico.s(137):  346a:Label defined error
tblD3
fr_dico.s(142):  3487:Label defined error
tblD4
fr_dico.s(147):  34a7:Label defined error
tblD5
and the sympbols table doesn't seems to be bad.

Code: Select all

0544 nbDICTIONNAIRE
0bed tblDictionnaireEnd
0bed tblD0
0bf5 tblD1
0c28 tblD2
0c45 tblD3
0c65 tblD4
0c86 tblD5
I think i've forget something ...
coco.oric as DidierV, CEO Member
Image Image

User avatar
Dbug
Site Admin
Posts: 2366
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Difficulties with XA during compilation

Post by Dbug » Tue Sep 05, 2017 7:15 am

Could you attach a small zipped folder exhibiting the issue?

User avatar
Chema
Game master
Posts: 2067
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Difficulties with XA during compilation

Post by Chema » Tue Sep 05, 2017 10:29 am

Mmmm couldn't it be that you are including #include "fr_dico.s" twice? It could be that fr_data.s includes it, or that it is in the file list that you are assembling (should not be explicitly in the makefile or list or however it is done in XA, as it is already included from your main file).

It is usually a good practice to include some guards for included files, such as (imagine my file to include is named myinclude.h:

Code: Select all

#ifndef MYINCLUDE_H
#define MYINCLUDE_H

<your definitions go here>

#endif
This way it does not matter how many times you include myinclude.h, it will end up only once in the compiled sources.

User avatar
coco.oric
Flight Lieutenant
Posts: 426
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: Difficulties with XA during compilation

Post by coco.oric » Thu Sep 07, 2017 6:11 am

oops

Image

au cachot (go to jail)
i'll put the #define now chema ...
i've included the file twice in 8 lines ... i've to open my eyes
thanks a lot for your help. i hope that next time, it will be for a real trouble
coco.oric as DidierV, CEO Member
Image Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest