Qbasicnews.com

Full Version: FB GFX Linux port doesn't seem to work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi, I posted about this over att fb.tk but there didn't seem to be anyone able to help me over there (but thanks for your helpfull pointers guys Smile ).

I downloaded and installed the latest fb (o.11) under fedora core 3, I did as I should (good boy) run the installation script as root and everything, and it worked. At least things seemed to work, and they do, as long as there is no graphics involved...

Neither gfxlib or sdl works.

I don't really know what spec about my computer to give, besides that I have fc3, my graphics card is an nvidia one and I use the driver that is shipped with fedora, not the one from nvidia. The error I get when running a simple example of gxlib code is (the code i run is: screen 12, sleep):

Standard graphics lib a window shows up but disappears directly and I get the errors:
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 145 (MIT-SHM)
Minor opcode of failed request: 3 (X_ShmPutImage)
Serial number of failed request: 21
Current serial number in output stream: 22
And my console gets all jumbled up.

And when compiling a .bas file that uses SDL I get the error:
Runtime error: 2
Which I don't know what it means...

Any clues? I would be happy if I just got gfxlib to work..

And by the way, do you have any pointers on how to make a lib for fb? I've made a normal library by compiling and librarify (ar rcs) the object file and I wrote a .bi file (mimicing one included with fb) but when I compile it, it just complains that it cant find the library.

Love this project, keep the good work up guys! :bounce:
Hmm... I seem to be getting "Runtime error: 2" also with SDL and TinyPTC examples on Gentoo Linux.

I remember the SDL one working with FB 0.10... that was before install.sh
There have been a lot of changes since 0.11 in the CVS, so your problem may already be gone with latest gfxlib... Can you try running this program? I just compiled it here with gfxlib out of CVS. Just use
Code:
wget http://www.ecplusplus.com/depth
And try running. Please let me know if it works!

About making lib, you can use FB itself to create libraries, no need to mess around with ar. Just have a look at examples/lib.
Hi lillo,

it works :rotfl:


And thanks for the tips about making libs, I'll check that out soon Big Grin :bounce:
Runtime error 2 happens in 0.11 due a problem with OPEN FOR BINARY that would open files only in read-write mode, if you are not logged as root, access to usr is read-only, so the compiler coudn't open the include files installed by the install script at usr/share/...

Version 0.12 won't have that problem, it will be released this week..
it workses!!!! ^_^

how about fullscreen?
Fullscreen works as long as your X server and driver allow it...

For example, I have a Radeon 9700, and I was using the opensource driver that came with XFree86 4.3.0 shipped with Ubuntu Linux. Using these default settings, FB programs where able to go fullscreen using ALT-Enter, and almost all resolutions seemed to be supported.
Too bad the opensource ATI driver doesn't support 3d acceleration, so to develop the FB gfxlib OpenGL driver I had to install the FGLRX ATI driver, a closed source one. After installing this, OpenGL was hw accelerated, but my programs were not able to switch to fullscreen... After some research, I found out the proprietary ATI driver doesn't allow it. Now I'm waiting for the next open-source ATI driver version which supports resolution switching and is said to also support 3d acceleration...
Quote:Runtime error 2 happens in 0.11 due a problem with OPEN FOR BINARY that would open files only in read-write mode, if you are not logged as root, access to usr is read-only, so the compiler coudn't open the include files installed by the install script at usr/share/...

Version 0.12 won't have that problem, it will be released this week..

Hmm, strange, since I changed the owner of the freebasic dir and it's subfolders and files to myself, so I do have read and write access to all files, which means that the fbc compiler should have it as well...
(it's nice to use chown -R Smile )
Quote:About making lib, you can use FB itself to create libraries, no need to mess around with ar. Just have a look at examples/lib.
Hm, I want to make a library out of a c-file, I suppose I didn't mention that... Anyway, when I look into the examples dir I really don't find any way to make it work.

I even used fbc -dll and fbc -lib to make my compiles cfile into a library for fb but I just can't see how to get it to to work.
fb's frontend knows how to put multiple .o files (along with compiling and including .bas files) into a lib. Just do something like fbc -lib a.o b.o c.o -x libmylib.a
Pages: 1 2