Page 1 of 2

Compile time

Posted: Sat Jul 08, 2006 1:12 am
by Seb McClouth
While compiling from the prompt I get a fatal error L1070: BC_DATA : segment size exceeds 64K. Someone can help me out on this one?

Posted: Sat Jul 08, 2006 6:17 am
by Seb McClouth
Alright, some more info.

The file in question is no big, it only contains the following:

Code: Select all

'$DYNAMIC
'$INCLUDE:'include\library.qh'

SUB Head
IF CPUType = "486" THEN
  x86 = 4 'This is dim shared in the library.qh as integer
ELSEIF CPUType = "386" THEN
  x86 = 3
END IF

END SUB

Posted: Sat Jul 08, 2006 6:38 am
by MystikShadows
how big is that library.qh and does it possibly have a sub that's bigger than 64 k in there somewhere..

Posted: Sat Jul 08, 2006 6:41 am
by Seb McClouth
library.qh doesn't have any subs, it's just a plain .bi file...

Posted: Sat Jul 08, 2006 7:10 am
by MystikShadows
adnd what does lib does it refer to?

Posted: Sat Jul 08, 2006 7:12 am
by Seb McClouth
It's the main .bi-file for all the subs and functions of the core and as well of the library.lib.

Posted: Sat Jul 08, 2006 7:18 am
by MystikShadows
well typically this means a sub or a function is bigger than 64 Kb in length...or perhaps a data type (UDT for example maybe one with an array in it) would exceed 64Kb.

IF youre using dynamic arrays of UDT's for example, if the TYPE definition length is not a multiple of a power of 2 (128, 256, 512, 1024 etc etc) it will be limited to 128 Kb and if it is a multiple of 2 then it can be bigger. Maybe that's part of the problem :-)

Posted: Sat Jul 08, 2006 7:19 am
by Seb McClouth
The library lib contains the routine to call cpu-stuff, it contains the code for bitshifting, cmos.read, delay-loop, interrupt (since I don't use qbx.bi), and STRIM$ (which combines LTRIM$, RTRIM$ and STR$

Posted: Sat Jul 08, 2006 7:22 am
by MystikShadows
I see....ok so how is BC_DATA defined?

Posted: Sat Jul 08, 2006 7:38 am
by Seb McClouth
That's the thing... I don't use BC_Data, it's QB's

Posted: Sat Jul 08, 2006 7:39 am
by Seb McClouth
Tried splitting up the library.qh in lib.qh (adjustable for the core), and library.qh just for library.lib... I get stuck with COMMON AND DECLARE must procde executalbe statements, duplicate definition, skipping forward to end type... I'm clueless...

Posted: Sat Jul 08, 2006 7:39 am
by MystikShadows
oh? hmmm...bummer...notsure what's happening...but you'd think QB manage itself better than this.

Posted: Sat Jul 08, 2006 7:42 am
by Seb McClouth
Porting linux to qb... hell of job... very erratic!! AARGH... Let's start over (again..)

Posted: Sat Jul 08, 2006 7:43 am
by MystikShadows
for the sake of experimentation, have you tried this with VB-DOS or the PDS ?

Posted: Sat Jul 08, 2006 7:44 am
by Seb McClouth
I'm using PDS... that's so fustrating...

Posted: Sat Jul 08, 2006 7:46 am
by MystikShadows
I know there's subtle differences between PDS and VB-DOS professional...I wonder if it would be enough to fix this.

Posted: Sat Jul 08, 2006 7:48 am
by Seb McClouth
It could be me... I'm at this for over a week now, and I'm porting C-code from Linux straight to QB...

Posted: Sat Jul 08, 2006 7:51 am
by MystikShadows
Quite possibly yes....maybe you just need to do something else for a day...and get back to it...I do that and usually the answer suddenly becomes very clear :-)...

Posted: Sat Jul 08, 2006 7:52 am
by Seb McClouth
I'm doing a lot in between... but sometimes the problem is so fustrating that I stop for a month... I come back... fix the **mn problem and then creating about 10 new ones...

Posted: Sat Jul 08, 2006 7:57 am
by MystikShadows
what C code are you porting? and what is the poprted version looking like?