ok, thanks for the reply. this is what i get on my Linux fedora9 2.6.26
i tried various "-lang" options but it never compiled. are there any pre-compiled gcbasic binaries for linux? any thoughts on how to fix this without a major overhaul of the GCBASIC.BAS code?
##########################
$ fbc -version
FreeBASIC Compiler - Version 0.20.0 (08-10-2008) for linux (target:linux)
$ fbc -arch 686 -v -exx GCBASIC.BAS
fbc: Symbol `ospeed' has different size in shared object, consider re-linking
compiling: GCBASIC.BAS -o GCBASIC.asm
GCBASIC.BAS(1) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'DS' in 'DECLARE SUB FindCalcSubs (DS$)'
GCBASIC.BAS(2) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'SN' in 'DECLARE FUNCTION SubListLocation (SN$)'
GCBASIC.BAS(3) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'DS' in 'DECLARE SUB FindSubs (DS$)'
GCBASIC.BAS(4) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'SubName'in 'DECLARE FUNCTION LocationOfSub (SubName$)'
GCBASIC.BAS(5) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found '(' in 'DECLARE FUNCTION Message$ (DS$)'
GCBASIC.BAS(6) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found '(' in 'DECLARE FUNCTION ShortName$ (DS$)'
GCBASIC.BAS(7) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'Var' in 'DECLARE FUNCTION IsDefined (Var$)'
GCBASIC.BAS(10) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'DS' in 'DECLARE FUNCTION IsWord (DS$)'
GCBASIC.BAS(11) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found '(' in 'DECLARE FUNCTION GetByte$ (DS$, BS%)'
GCBASIC.BAS(12) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'C' in 'DECLARE SUB InitCompiler (C$)'
GCBASIC.BAS(12) error 123: Too many errors, exiting
now try with "-lang deprecated" option
$ fbc -arch 686 -lang deprecated -exx GCBASIC.BAS
fbc: Symbol `ospeed' has different size in shared object, consider re-linking
GCBASIC.BAS(6678) error 56: Illegal specification, at parameter 1 (VAR) of Replace()
SUB Replace (VAR$, FIND$, REP$)
^
GCBASIC.BAS(6680) error 89: No matching overloaded function, UCASE()
VART$ = UCASE$(VAR$): FINDT$ = UCASE$(FIND$)
^
GCBASIC.BAS(6681) error 139: Auto variables are only valid in -lang fb, found 'VAR'
IF INSTR(VART$, FINDT$) = 0 THEN VAR$ = VAR$ + REP$: EXIT SUB
^
GCBASIC.BAS(6683) error 89: No matching overloaded function, LEFT()
ND$ = LEFT$(VAR$, INSTR(VART$, FINDT$) - 1)
^
GCBASIC.BAS(6685) error 9: Expected expression, found 'VAR'
ND$ = ND$ + MID$(VAR$, INSTR(VART$, FINDT$) + LEN(FIND$))
^
GCBASIC.BAS(6687) error 139: Auto variables are only valid in -lang fb, found 'VAR'
VAR$ = ND$
^
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Before doing anything else, I'd try to find the exact same version of FreeBasic (Version 0.18.5) that I used. I am not aware of any pre-compiled version of GCB.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am glad to hear that you successfully compiled GCB. To upload my code to PIC chips, I use PICkit 2. It is worth mentioning that there is a linux command line program pk2cmd that works well with PICkit 2.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
what are the commandline opts for 'fbc' to compile GCBASIC for linux? what other steps do I need to do to get GCBASIC running on linux?
I am using:
fbc -version
FreeBASIC Compiler - Version 0.18.5 (04-17-2008) for linux (target:linux)
and my commandline is
fbc -arch 586 -exx gcbasic.bas
ok, thanks for the reply. this is what i get on my Linux fedora9 2.6.26
i tried various "-lang" options but it never compiled. are there any pre-compiled gcbasic binaries for linux? any thoughts on how to fix this without a major overhaul of the GCBASIC.BAS code?
##########################
$ fbc -version
FreeBASIC Compiler - Version 0.20.0 (08-10-2008) for linux (target:linux)
$ fbc -arch 686 -v -exx GCBASIC.BAS
fbc: Symbol `ospeed' has different size in shared object, consider re-linking
compiling: GCBASIC.BAS -o GCBASIC.asm
GCBASIC.BAS(1) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'DS' in 'DECLARE SUB FindCalcSubs (DS$)'
GCBASIC.BAS(2) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'SN' in 'DECLARE FUNCTION SubListLocation (SN$)'
GCBASIC.BAS(3) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'DS' in 'DECLARE SUB FindSubs (DS$)'
GCBASIC.BAS(4) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'SubName'in 'DECLARE FUNCTION LocationOfSub (SubName$)'
GCBASIC.BAS(5) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found '(' in 'DECLARE FUNCTION Message$ (DS$)'
GCBASIC.BAS(6) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found '(' in 'DECLARE FUNCTION ShortName$ (DS$)'
GCBASIC.BAS(7) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'Var' in 'DECLARE FUNCTION IsDefined (Var$)'
GCBASIC.BAS(10) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'DS' in 'DECLARE FUNCTION IsWord (DS$)'
GCBASIC.BAS(11) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found '(' in 'DECLARE FUNCTION GetByte$ (DS$, BS%)'
GCBASIC.BAS(12) error 137: Suffixes are only valid in -lang deprecated or fblite or qb, found 'C' in 'DECLARE SUB InitCompiler (C$)'
GCBASIC.BAS(12) error 123: Too many errors, exiting
now try with "-lang deprecated" option
$ fbc -arch 686 -lang deprecated -exx GCBASIC.BAS
fbc: Symbol `ospeed' has different size in shared object, consider re-linking
GCBASIC.BAS(6678) error 56: Illegal specification, at parameter 1 (VAR) of Replace()
SUB Replace (VAR$, FIND$, REP$)
^
GCBASIC.BAS(6680) error 89: No matching overloaded function, UCASE()
VART$ = UCASE$(VAR$): FINDT$ = UCASE$(FIND$)
^
GCBASIC.BAS(6681) error 139: Auto variables are only valid in -lang fb, found 'VAR'
IF INSTR(VART$, FINDT$) = 0 THEN VAR$ = VAR$ + REP$: EXIT SUB
^
GCBASIC.BAS(6683) error 89: No matching overloaded function, LEFT()
ND$ = LEFT$(VAR$, INSTR(VART$, FINDT$) - 1)
^
GCBASIC.BAS(6685) error 9: Expected expression, found 'VAR'
ND$ = ND$ + MID$(VAR$, INSTR(VART$, FINDT$) + LEN(FIND$))
^
GCBASIC.BAS(6687) error 139: Auto variables are only valid in -lang fb, found 'VAR'
VAR$ = ND$
^
Before doing anything else, I'd try to find the exact same version of FreeBasic (Version 0.18.5) that I used. I am not aware of any pre-compiled version of GCB.
FreeBASIC Compiler - Version 0.18.3 (10-12-2007) for linux (target:linux)
that ver worked with the "-lang qb" option.
mucho gracias
I am glad to hear that you successfully compiled GCB. To upload my code to PIC chips, I use PICkit 2. It is worth mentioning that there is a linux command line program pk2cmd that works well with PICkit 2.