IonicWind Software

IWBasic for Linux => General IWLP Discussion => Topic started by: ExMember001 on June 02, 2007, 07:38:25 PM

Title: ebmake v1.0.1
Post by: ExMember001 on June 02, 2007, 07:38:25 PM
ebmake is a little tool made to compile and link an Ebasic Linux source file under Linux
just copy the file in the folder where your .eba file is and execute under terminal :

./ebmake


here's the source code:

$main
DEF filename as string
DEF filen as string
DEF goforit as CHAR
DEF startpath as string
startpath = getstartpath()

INPUT "Enter the filename to compile and link:  ",filename
filen = LEFT$(filename,len(filename)-4)
INPUT "Compile (Y/N)? ",goforit
IF (goforit = ASC("Y")) | (goforit = ASC("y"))
  gosub compile()
  INPUT "Create executable (Y/N)? ",goforit
  IF (goforit = ASC("Y")) | (goforit = ASC("y"))
    gosub link()
  ENDIF
ENDIF

system("nautilus", startpath)
END

sub compile()
def cmd as string
cmd = startpath + filename + " " + startpath + filen + ".o"
print "Compiling..."
system("ebparse", cmd)
endsub

sub link()
def cmd as string
cmd = "-lc -lgtk-x11-2.0 -o \"" + filen + "\" \"" + filen +".o\" " + "/usr/lib/libebasic.a --dynamic-linker /lib/ld-linux.so.2"
print "linking..."
system("ld", cmd)
endsub


a compiled version is attached.
Title: Re: ebmake v1.0.1
Post by: ExMember001 on June 02, 2007, 08:29:14 PM
little fix
Title: Re: ebmake v1.0.1
Post by: Doc on June 02, 2007, 08:58:27 PM
works great!  :D

Thanks!
Title: Re: ebmake v1.0.1
Post by: Rock Ridge Farm (Larry) on June 03, 2007, 07:30:21 PM
When I try to compile the code I get the following:
ebparse compile.eba compile.o
File: compile.eba (7) Warning: undeclared function 'getstartpath'
File: compile.eba (7) invalid assignment
File: compile.eba (9) syntax error - "
What am I doing wrong?
Title: Re: ebmake v1.0.1
Post by: ExMember001 on June 03, 2007, 07:44:22 PM
its mean there's some problem with your getstartpath function ;)
show the code pls
Title: Re: ebmake v1.0.1
Post by: Doc on June 03, 2007, 07:50:21 PM
...the code compiles and works fine here on this end.  :-\

-Doc-
Title: Re: ebmake v1.0.1
Post by: Ionic Wind Support Team on June 03, 2007, 07:57:27 PM
More likely you have your linker command wrong.  Remember to include libebasic.a

Paul.
Title: Re: ebmake v1.0.1
Post by: Rock Ridge Farm (Larry) on June 03, 2007, 08:12:02 PM
Krypt - it is you code posted above.
I think nasm is .missing but I can not get it to download and load.
This is Ubuntu 7.04 just loaded tonight on an HP laptop.
apt-get install nasm gives me an error about not existing.
Title: Re: ebmake v1.0.1
Post by: ExMember001 on June 03, 2007, 08:39:13 PM
try with the synaptic manager for nasm
Title: Re: ebmake v1.0.1
Post by: Rock Ridge Farm (Larry) on June 03, 2007, 08:56:59 PM
After much ker-finger-poken - I got it to almost work.
Had to do a total refresh of all packages.
Now just trying to figure out where the ebstd.incc file is supposed to go.
It is not finding it.
Title: Re: ebmake v1.0.1
Post by: Ionic Wind Support Team on June 03, 2007, 10:35:45 PM
ebstd.incc goes in \usr\bin

The instuctions for installing are located in the first post of "Preview version instructions"

http://www.ionicwind.com/forums/index.php/topic,1689.0.html
Title: Re: ebmake v1.0.1
Post by: Rock Ridge Farm (Larry) on June 04, 2007, 06:11:17 AM
Yup - figured out where .incc went.
Now I get an error about -lgtkx11-2.0 not being found.
Have not been able to locate that package yet.
Everything is working fine on the previous release of Ubunto on another box.
Just wanted the laptop working so I can sit on the back porch.
Title: Re: ebmake v1.0.1
Post by: Ionic Wind Support Team on June 04, 2007, 07:38:28 AM
Should be a dash in there.

-lgtk-x11-2.0

And you should make sure the libgtk2.0-0 package is installed
Title: Re: ebmake v1.0.1
Post by: Rock Ridge Farm (Larry) on June 04, 2007, 07:58:12 AM
Package is installed - it just complains about the x11 lib.
I just typo'd the name in the post.
Title: Re: ebmake v1.0.1
Post by: Rock Ridge Farm (Larry) on June 04, 2007, 05:45:59 PM
re-loaded everything and now it is all working - strange.