Think I am in trouble: Too many defined labels

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.

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

Think I am in trouble: Too many defined labels

Post by Chema »

Greetings. This is mainly to Dbug. I think I am getting into trouble, as I get the error "Too many defined labels" when compiling 1337.

The error is generated at the linking stage, I think by link65. I have taken a look a the sources, but did not spot where the error comes from or which is the limit.

If it is indeed that I have reached the maximum number of labels, I have a problem. I am not sure how to solve this, although most labels are local. If maybe there is a way to increase this number it would be great.

Another possibility is that it there is some kind of error in the sources or something I need to check?

Any hint, please?
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

I can take a look at that :)
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Ok, it's a hard limit in the old Link65.c:

Code: Select all

if (dcount > 1999) 
{
	linkerror("\nToo many defined labels\n");
	exit(1);
}
This limit is not in the C++ version, but I did not release a version with it because there is a bug :p

I will try to see if I can fix the C++ version, and if not I can probably rebuild a C version with a new limit, like 2010 ;-)
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Dbug wrote:Ok, it's a hard limit in the old Link65.c:

This limit is not in the C++ version, but I did not release a version with it because there is a bug :p

I will try to see if I can fix the C++ version, and if not I can probably rebuild a C version with a new limit, like 2010 ;-)
Ok thanks Dbug. That explains why I did not see where the error message was in the svn sources. Surely that is the size of the internal dictionary that manages them.

So I surpassed 2000 labels? Wow. I could even have a look and try to compile a new version with something as 10000 labels for me...
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Maybe in this day and age it was never envisaged that a 64K computer program would ever require 2000 or more labels? But then our projects are rather cutting edge and we will keep pushing the boundaries :)
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

The C++ linker has been fixed thanks to a good repro-case by Chema, so the constraints on the number of labels is now gone.

The next big bug in the current osdk code is something with XA not accepting some characters in comments. When this is fixed I will release a new version of the OSDK (Release Candidate) and ask people to test it before I publish it - it may contains bugs I've missed, because there's quite a lot of modified code.
Post Reply