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.
little fix
works great! :D
Thanks!
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?
its mean there's some problem with your getstartpath function ;)
show the code pls
...the code compiles and works fine here on this end. :-\
-Doc-
More likely you have your linker command wrong. Remember to include libebasic.a
Paul.
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.
try with the synaptic manager for nasm
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.
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
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.
Should be a dash in there.
-lgtk-x11-2.0
And you should make sure the libgtk2.0-0 package is installed
Package is installed - it just complains about the x11 lib.
I just typo'd the name in the post.
re-loaded everything and now it is all working - strange.