Qbasicnews.com

Full Version: Help needed..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Hi, i've ported a bunch of libs and now i need some ppl to write examples for them, what will help testing the new headers too..

The libraries are:

1) Gtk+ (the GUI toolkit): http://www.gtk.org/ or http://gladewin32.sourceforge.net/module...=Downloads

2) cgi-util (cgi helper lib): http://www.newbreedsoftware.com/cgi-util/

3) ODE (rigid body dynamics): http://ode.org/

4) GSL (Scientific Library): http://www.gnu.org/software/gsl/

5) GDSL (Generic Data Structures Library): http://www.nongnu.org/gdsl/

6) MiniXML: http://www.easysw.com/~mike/mxml/

7) PDFLib (PDF creation): http://www.pdflib.com/

8) libxslt (style-sheets transforms): http://xmlsoft.org/XSLT/

9) DevIL (image library): http://openil.sourceforge.net/

All headers are in the CVS ( http://sourceforge.net/cvs/?group_id=122342 ), for FBC, you can use the pre-release that Angelo built ( http://forum.qbasicnews.com/viewtopic.ph...549#101549 ).

The examples should be simple, using a couple of functions of each library, nothing complex please. Direct translations from the C examples that use to come with the libs listed are welcome.

Full credits will be given, any help is appreciated, thanks..
I'll do miniXML
:o Wow, you are a busy little beaver!
I am all up for doing the GSL, its just..... is there an easier way to get the include files. 214 is a bit to do by hand and I have been unsuccessful in get to the CVS with TortoiseCVS (I am most likely doing something wrong).

EDITED: Nevermind guys, I got winCVS to work. I will get on the gsl examples.
You said short and nothing complex. Will this do for the GSL?

Code:
option explicit
'Calling functions in the GSL
'main site http://www.gnu.org/software/gsl/
'a windows port is at http://gnuwin32.sourceforge.net/packages/gsl.htm
'
#include "gsl\gsl_math.bi"
#include "gsl\gsl_matrix.bi"

dim y as double
'Two elementary math functions

'raise the value of 3.141 to the fourth power
y = gsl_pow_4 (3.141)
? "3.141 ^ 4 = "; y
?

'Find the hypotenuse of a right triangle with sides 3 and 4
y = gsl_hypot(3,4)
? "The hypotenuse of a right triangle with sides of length 3 and 4 is";y
?

'an example from the matrix library
dim i as integer
dim j as integer
dim m as gsl_matrix ptr

'gsl uses the c-style row major order, unlike VB and ForTran
? "A 3x3 matrix"
m = gsl_matrix_alloc(3, 3)
for i = 0 to 2
   for j = 0 to 2
      gsl_matrix_set (m, i, j, 0.23 + 100*i + j)
   next j
next i

for i = 0 to 2
   for j = 0 to 2
      print "m(";i;",";j;") = ";gsl_matrix_get (m, i, j)
   next j
next i
?
gsl_matrix_transpose(m)
? "And its transpose"
for i = 0 to 2
   for j = 0 to 2
      print "m(";i;",";j;") = ";gsl_matrix_get (m, i, j)
   next j
next i
sleep

It is a lovely library!
This reminds me to send you the GLADE and wx-c.dll examples :wink:
argh, v1c, i need more files to use the SWIG fb wrapper: freebasic.swg is missing...

Then I'll get on some examples; perhaps Gtk+ and/or libxslt...
Thanks keeling, i already added the example to the CVS, if you want your real name or email to be listed on the credits, just tell.

Any lib you want Von, i'll be on the irc this weekend, you can send me it, i didn't test the mini-xml headers tho.

Sure fsw, a glade xml example would be nice, i added one with a simple button and stuff.. too bad Glade itself isn't pluggable, you have to write a full app to convert between to xml file to real-code, it only supports C and C++ directly.. a VB .frm to Gtk would be easier to do :P

DrV, ops, sorry, i forgot about the .swg thing, i changed swig, they are not needed anymore. You can do this if you want: create a dir called Lib/freebasic where swig.exe is and add two blank files called freebasic.swg and typemaps.i, the originals have nothing inside..
yeah v1c why don't you put the wx-c stuff into cvs?
Does this mean there'll be a new, proper release of 0.13b out soon?
Pages: 1 2 3 4