basicprogramming.org


Welcome, Guest. Please login or register.
Did you miss your activation email?
Forum time; Jul 31. 2010, 01:24
Home Help Search Calendar Login Register
News: Have you got suggestions for BasicProgramming.org? Let's hear them!
Interested in creating your own programming language? Check out the QDepartment group!

+  BASIC programming forum
|-+  Interpreter Development
| |-+  yaBasic development forum. (Moderator: Thomas Larsen)
| | |-+  Yabasic 2.9.9 + SDL 0.5
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 [2] 3 4 Go Down Reply Print
Author Topic: Yabasic 2.9.9 + SDL 0.5  (Read 943 times)
psnake
Sr. Member
****
Offline Offline

Posts: 438



« Reply #15 on: Jan 23. 2010, 13:35 » Reply with quote

you just need to do make. if there are errors about SDL.h not being found you need to install sdl-dev package.

It should write a lot of warnings like Derek said, but none is harmful.

PSnake
« Last Edit: Jan 23. 2010, 13:36 by psnake » Report to moderator   Logged

twitter: @PSnake89
gersen
Sr. Member
****
Offline Offline

Posts: 348


« Reply #16 on: Jan 23. 2010, 14:06 » Reply with quote

menn, I know you're not heavy into compiling, so here you go.

Open a terminal in the unzipped folder.
Do make clean         to get shot of the 64 bit object files
Do make                  to build yabasic

You should now find the binary in the bin folder.

Hope that puts it together.

 
Report to moderator   Logged
menn
Hero Member
*****
Offline Offline

Posts: 571


« Reply #17 on: Jan 23. 2010, 15:25 » Reply with quote

hey much appreciated. you're right, the only thing i've ever successfully compiled was some vi clone with specific instructions, and yabasic 3. the same instructions (included in latest yabasic) have worked up until 2.9.9, which require (slightly) different instructions. for example 2.9.8 there was a configure script. and i had to use make install (so i thought.) i hate compiling, but for yabasic i'm always willing to try so long as it doesn't become too difficult.

by the way, it seemed to compile the new one (i see a binary, bash colors it green) in the bin folder, but the new one --version still reports 2.9.8, probably a "bug" in 2.9.9. the md5sum differs from the old copy of 2.9.8, adding more to the evidence that it's really 2.9.9. now to see what new features if any are here.
« Last Edit: Jan 23. 2010, 15:31 by menn » Report to moderator   Logged

an "all purpose" language calls for- as much as can possibly be reasonable- an "all purpose" forum. the worst thing happening to modern basic? too many pointless rules and painting everything into corners. most modern basic forums are like that too.
psnake
Sr. Member
****
Offline Offline

Posts: 438



« Reply #18 on: Jan 23. 2010, 15:29 » Reply with quote

by the way, it seemed to compile the new one (i see a binary, bash colors it green) in the bin folder, but the new one --version still reports 2.9.8, probably a "bug" in 2.9.9. the md5sum differs from the old copy of 2.9.8, adding more to the evidence that it's really 2.9.9. now to see what new features if any are here.

Thanks for noticing that, I forgot to alter the version. Won't forget next time, I hope Roll Eyes

PSnake
Report to moderator   Logged

twitter: @PSnake89
menn
Hero Member
*****
Offline Offline

Posts: 571


« Reply #19 on: Jan 23. 2010, 15:31 » Reply with quote

it seemed to compile, runs ok but (while aptitude says libsdl-dev is already installed) this message when i try to run graphics_test.yab is very unreassuring:

Quote
./yabasic: ./lib/graphics.yab:6: couldn't open plugin named sdl: dlerror(): ./plugins/sdl.ybp: cannot open shared object file: No such file or directory
Report to moderator   Logged

an "all purpose" language calls for- as much as can possibly be reasonable- an "all purpose" forum. the worst thing happening to modern basic? too many pointless rules and painting everything into corners. most modern basic forums are like that too.
psnake
Sr. Member
****
Offline Offline

Posts: 438



« Reply #20 on: Jan 23. 2010, 15:33 » Reply with quote

Did you run yabasic from inside the bin/ directory?

Code:
./yabasic something.yab

PSnake
Report to moderator   Logged

twitter: @PSnake89
menn
Hero Member
*****
Offline Offline

Posts: 571


« Reply #21 on: Jan 23. 2010, 16:42 » Reply with quote

Quote
/tmp/yabasic/bin$ ./yabasic graphics_test.yab

yep. message that results in already posted.
Report to moderator   Logged

an "all purpose" language calls for- as much as can possibly be reasonable- an "all purpose" forum. the worst thing happening to modern basic? too many pointless rules and painting everything into corners. most modern basic forums are like that too.
psnake
Sr. Member
****
Offline Offline

Posts: 438



« Reply #22 on: Jan 23. 2010, 16:51 » Reply with quote

Can you tell me if there is a file called sdl.ybp inside plugins/

PSnake
Report to moderator   Logged

twitter: @PSnake89
gersen
Sr. Member
****
Offline Offline

Posts: 348


« Reply #23 on: Jan 23. 2010, 17:24 » Reply with quote

Not sure where you are running this from menn, what's with the /bin$ on your command line ? If you move the binary out the source folder, you have to take the whole bin folder which includes the plugin.

For example I unpacked to my root folder, compiled and ran direct from in there so the command line looks like this:

root: ~/yabasic-2.9.9-sdl-0.5/bin > ./yabasic graphics_test.yab




Report to moderator   Logged
menn
Hero Member
*****
Offline Offline

Posts: 571


« Reply #24 on: Jan 24. 2010, 00:37 » Reply with quote

psnake, no there is only a .dll in that folder.

gersen, /tmp/yabasic/bin$ means that bin is in /tmp/yabasic, and i was running "./yabasic graphics_test.yab" with /tmp/yabasic/bin as the working directory. i'd unzipped the zip file into /tmp, which created the yabasic folder.

then i compiled from /tmp/yabasic, where the files were.

and (once i knew what commands to type) this all worked, except there's clearly a file missing from the plugins folder. i can't explain that. but the graphics demo aside, the binary works. i haven't moved any folders or anything.

Quote
cd /tmp ; find | grep -i ybp
./yabasic/build_windows/ybp_testdrive.cbp
./yabasic/build_windows/ybp_testdrive.depend
./yabasic/build_windows/ybp_sdl.cbp
./yabasic/build_windows/ybp_sdl.layout
./yabasic/build_windows/ybp_testdrive.layout
./yabasic/build_windows/ybp_sdl.depend
./yabasic/src/plugins/testdrive.ybp
./yabasic/src/plugins/ybp_interface.h
./yabasic/src/plugins/ybp_util.h
./yabasic/src/plugins/ybp_interface.c
« Last Edit: Jan 24. 2010, 00:41 by menn » Report to moderator   Logged

an "all purpose" language calls for- as much as can possibly be reasonable- an "all purpose" forum. the worst thing happening to modern basic? too many pointless rules and painting everything into corners. most modern basic forums are like that too.
Derek
Administrator
Hero Member
*****
Offline Offline

Posts: 1001



WWW
« Reply #25 on: Jan 24. 2010, 02:49 » Reply with quote

Hi,

you have got us all scratching our heads.
Code:
cd /tmp/yabasic
make clean
make
cd bin
./yabasic graphics_test.yab
or try
Code:
cd /tmp/yabasic
make spotless
make build-all
cd bin
./yabasic graphics_test.yab
make and make build-all both create sdl.ybp The only other thing I can think of (and I'm certain it won't make any difference) is to try building Yabasic within your home directory.

Derek.
Report to moderator   Logged

wget http://*
gersen
Sr. Member
****
Offline Offline

Posts: 348


« Reply #26 on: Jan 24. 2010, 04:32 » Reply with quote

I think I may see where this is coming from. You have to run make in the unzipped main folder, yabasic-2.9.9-sdl-0.5, and not from the src folder.
I just tried it from the src folder and all you get is the yabasic binary and not the plugin as you report.


Report to moderator   Logged
menn
Hero Member
*****
Offline Offline

Posts: 571


« Reply #27 on: Jan 24. 2010, 08:31 » Reply with quote

I think I may see where this is coming from. You have to run make in the unzipped main folder, yabasic-2.9.9-sdl-0.5, and not from the src folder.

i'm pretty sure i did! but, today i start over trying to compile it again, will pay even more attention to what folder i run make from. i admit, the part about how you were able to reproduce my problem by using the src folder is a good sign i did something wrong. let's find out.

edit: no, i unzipped it from /tmp, it created the /tmp/yabasic folder, i cd'd to /tmp/yabasic, ran make clean and make, and it did the same thing as before. same list of files with "ybp" (case insensitive) in them (and still only sdl.dll in bin/plugins, no sdl.ybp or other files there.)

this is precisely why i'm not heavy into compiling, by the way. it almost never freakin' works, and when it eludes me, i am pointed to the lfs tutorials, which might as well be written in klingon for all i understand. people are like "it's not complicated!" bs, it's as complicated as any user task, or more. but i appreciate you trying to help. that's rare in my "experience" with compiling. i can see how anyone would give up on the idea, and i actually stopped using the tinycore distro because there was condescension over the difficulty involved. (that, and 2.x is slow and unstable compared to the first.)

Quote
cd /tmp ; find | grep -i ybp
./yabasic/build_windows/ybp_testdrive.cbp
./yabasic/build_windows/ybp_testdrive.depend
./yabasic/build_windows/ybp_sdl.cbp
./yabasic/build_windows/ybp_sdl.layout
./yabasic/build_windows/ybp_testdrive.layout
./yabasic/build_windows/ybp_sdl.depend
./yabasic/src/plugins/testdrive.ybp
./yabasic/src/plugins/ybp_interface.h
./yabasic/src/plugins/ybp_util.h
./yabasic/src/plugins/ybp_interface.c
« Last Edit: Jan 24. 2010, 08:45 by menn » Report to moderator   Logged

an "all purpose" language calls for- as much as can possibly be reasonable- an "all purpose" forum. the worst thing happening to modern basic? too many pointless rules and painting everything into corners. most modern basic forums are like that too.
Cybermonkey
Global Moderator
Hero Member
*****
Offline Offline

Posts: 930



WWW
« Reply #28 on: Jan 24. 2010, 09:08 » Reply with quote

What is the result of
Code:
sdl-config --libs --cflags
in terminal?
Report to moderator   Logged

Best wishes,
Cybermonkey
Cybermonkey
Global Moderator
Hero Member
*****
Offline Offline

Posts: 930



WWW
« Reply #29 on: Jan 24. 2010, 09:41 » Reply with quote

Ok, I think I can help you now. Don't know why, but I compiled yabasic in my virtual xubuntu, and came up with the following:
Quote
vmarkus@vmarkus-desktop:~/yabasic/bin$ ./yabasic graphics_test.yab
./yabasic: ./lib/graphics.yab:6: couldn't open plugin named sdl: dlerror(): ./plugins/sdl.ybp: cannot open shared object file: No such file or directory
So what to do?
cd into yabasic/src/plugins and do a "make" and this should happen:
Quote
vmarkus@vmarkus-desktop:~/yabasic/src/plugins$ make
gcc -std=c99 -shared -fPIC -O2 -Wall -Wextra -pedantic -DSYSTEM_UNIX -I. testdrive/testdrive.c ybp_interface.c -o testdrive.ybp
gcc -std=c99 -shared -fPIC -O2 -Wall -Wextra -pedantic -DSYSTEM_UNIX -I. -lSDL sdl/sdl_interface.c ybp_interface.c -o sdl.ybp
sdl/sdl_interface.c:4:33: warning: ISO C99 requires rest arguments to be used
sdl/sdl_interface.c:31:33: warning: ISO C99 requires rest arguments to be used
sdl/sdl_interface.c:93:33: warning: ISO C99 requires rest arguments to be used
sdl/sdl_interface.c:110:33: warning: ISO C99 requires rest arguments to be used
sdl/sdl_interface.c:118:33: warning: ISO C99 requires rest arguments to be used
sdl/sdl_interface.c:342:33: warning: ISO C99 requires rest arguments to be used
sdl/sdl_interface.c:806:33: warning: ISO C99 requires rest arguments to be used
sdl/sdl_interface.c:816:33: warning: ISO C99 requires rest arguments to be used
sdl/sdl_interface.c:826:33: warning: ISO C99 requires rest arguments to be used
mv *.ybp ../../bin/plugins/
vmarkus@vmarkus-desktop:~/yabasic/src/plugins$ cd
vmarkus@vmarkus-desktop:~$ cd yabasic/bin/
vmarkus@vmarkus-desktop:~/yabasic/bin$ ./yabasic graphics_test.yab
fps: 1000
fps: 1000
fps: 17.8571434
fps: 8.064516068
...
Don't know what's wrong with the Makefile since it worked on all other installations with me ... but this workaround should compile the plugin.
Report to moderator   Logged

Best wishes,
Cybermonkey
Pages: 1 [2] 3 4 Go Up Reply Print 
« previous next »
Jump to:  
Atom RDF RSS 0.91 RSS 2.0


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!