Extended Library 0.5.0 is out!

User projects written in or related to FreeBASIC.
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Extended Library 0.5.0 is out!

Postby sir_mud » Jan 07, 2014 3:59

TL;DR
0.24 is required for full support, status: https://code.google.com/p/fb-extended-l ... .fb901.txt
Downloads at http://ext.freebasic.net/get
Online API Reference at http://ext.freebasic.net/dev-docs
Links to all the other stuff: http://ext.freebasic.net

About the Extended Library Project:
Since 2007, the FreeBASIC Extended Library aims to provide a portable, community-driven set of libraries designed exclusively for FreeBASIC development, and includes many commonly used game-oriented and general purpose APIs written by the community and licensed under a BSD type license to maximize user freedom.

Big thanks to everyone who has contributed to this and previous releases, we couldn't do it without you!

New in this release:
* BSON - Convert BSON to JSON and vice versa
* GIF - You can now load GIF images (including animations)
* Threads - Bidirectional Communication Channel and Mutex classes
* Logging - Log to file, console or make your own
* ZipFile - Read/Write access to zip files

We need your help!
The FreeBASIC Extended Library is always looking for new submissions. Submissions do not necessarily need to be code, in fact our primary concern at the moment is improving the documentation. We feel the best way to improve the documentation is with more tutorials and a User's Guide that combines an overview of the api (the what) of the modules with the why, the how and the when. So if you are handy with a text editor and know your way around a certain part of the library, please help us out by writing a tutorial or an in-depth article about a submodule/class/set of functions. After review, your submission may be added to the User's Guide. For other ideas on how to contribute to this (or any other open source) project here: http://blog.smartbear.com/programming/1 ... rock-star/ is a great article. Thank you for your time and I hope you enjoy using the FreeBASIC Extended Library as much as we have enjoyed working on it!
Kot
Posts: 335
Joined: Dec 28, 2006 10:34

Re: Extended Library 0.5.0 is out!

Postby Kot » Jan 09, 2014 15:41

When I try to compile the examples, I get the messages:

Build error(s)
F:\Basice\FreeBASIC\fbc -s console "builder.bas"
F:\Basice\FreeBASIC\bin\win32\ld.exe: cannot find -lext-misc
F:\Basice\FreeBASIC\bin\win32\ld.exe: cannot find -lext-xml
F:\Basice\FreeBASIC\bin\win32\ld.exe: cannot find -lext-math
F:\Basice\FreeBASIC\bin\win32\ld.exe: cannot find -lext-strings
F:\Basice\FreeBASIC\bin\win32\ld.exe: cannot find -lext-xstring

Build error(s)

And what about the network capabilities? There are only files for http communication - are there procs for sending pure text or blocks of bytes?
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Re: Extended Library 0.5.0 is out!

Postby sir_mud » Jan 09, 2014 15:54

Kot wrote:When I try to compile the examples, I get the messages:

Build error(s)
F:\Basice\FreeBASIC\fbc -s console "builder.bas"
F:\Basice\FreeBASIC\bin\win32\ld.exe: cannot find -lext-misc
F:\Basice\FreeBASIC\bin\win32\ld.exe: cannot find -lext-xml
F:\Basice\FreeBASIC\bin\win32\ld.exe: cannot find -lext-math
F:\Basice\FreeBASIC\bin\win32\ld.exe: cannot find -lext-strings
F:\Basice\FreeBASIC\bin\win32\ld.exe: cannot find -lext-xstring

Build error(s)

And what about the network capabilities? There are only files for http communication - are there procs for sending pure text or blocks of bytes?

That builder is not really supported any more, I'll either update it or remove it from the next release. the errors mean you need to either copy the library files to your freebasic lib directory or use the -p option to fbc to tell it where you have the libraries.

check out http://ext.freebasic.net/dev-docs/files ... cp-bi.html or http://ext.freebasic.net/dev-docs/files ... dp-bi.html for the"raw" network api, I'll work up an example of their usage when I'm near my computer later, but they are pretty straight forward. let me know if you need any more help.
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Re: Extended Library 0.5.0 is out!

Postby sir_mud » Jan 16, 2014 3:20

I've added a Git repo to go along with the current mercurial repo. I prefer mercurial myself but I know others prefer git so I have no problem keeping to different repos in sync (there are great scripts that do it all for me). So starting today we're also accepting pull requests and issue reports on Github.

Source Code:
Git: https://github.com/FreeBASIC-Extended-L ... fb-ext-lib
hg: https://code.google.com/p/fb-extended-l ... e/checkout

Also, I have identified the specific commit in fbc that started causing problems for the project so I'm working on resolving that issue. Interested parties can get more information here: https://code.google.com/p/fb-extended-l ... tail?id=29
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Re: Extended Library 0.5.0 is out!

Postby sir_mud » Jan 23, 2014 18:22

I'm pleased to announce as of today the current development version of ext fully works with the current git version of freebasic. Unfortunatly ext will never be compatible with 0.90.x because of incompatible changes to the preprocessor in this version but those issues have been identified and resolved. There are several very cool new features currently in the development version, stay tuned for the next release!
Pritchard
Posts: 5486
Joined: Sep 12, 2005 20:06
Location: Ohio, USA

Re: Extended Library 0.5.0 is out!

Postby Pritchard » Mar 18, 2014 4:20

Glad to see work is still being done on this. I think I will look into it next time I fiddle around with FreeBASIC.
Jonge
Posts: 129
Joined: Jul 17, 2012 17:51
Location: Norway
Contact:

Re: Extended Library 0.5.0 is out!

Postby Jonge » Mar 18, 2014 21:29

Im missing "libz" when doing some tests. Should it not be in the download?

Edit:
Found a download for the lib. Now I have the same problem with "libjpeg"

Im not sure why my code needs the jpeg library(also tried to add FBEXT_NO_LIBJPG):

Code: Select all

#define FBEXT_NO_LIBJPG -1

#Include "ext/graphics/font.bi"
#include "ext/graphics/png.bi"

using ext

#Include Once "fbgfx.bi"

Dim MyFontImage As FB.IMAGE Ptr
Dim As String FileName
Dim As UInteger Col
Dim As Integer FontSize

ScreenRes 640, 480, 32

If Trim(Command) = "" Then
   Input "FileName: ", Filename
Else
   Filename = Command
EndIf

Input "Font size: ", FontSize
If FontSize = 0 Then FontSize = 12

Col = RGB(255,255,255)

Var ReturnValue = ext.gfx.font.LoadTTF(FileName, 1, 128, FontSize, Col, MyFontImage)
If ReturnValue = 0 Then
   Print "Error when loading font."
End If

Draw String (10,50), "Hello world!", RGB(255,0,0), MyFontImage, Alpha
Draw String (10,100), "Hello world!", RGB(255,255,255), MyFontImage

Mid(FileName, Len(FileName) - 3) = "    "
FileName =  Trim(FileName) & "_" & FontSize & ".png"

ext.gfx.png.save(FileName, MyFontImage)

Sleep
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Re: Extended Library 0.5.0 is out!

Postby sir_mud » Mar 19, 2014 1:20

All third-party libraries are in the bin directory. I think there may have been an issue with library linking that has been fixed in master.
Jonge
Posts: 129
Joined: Jul 17, 2012 17:51
Location: Norway
Contact:

Re: Extended Library 0.5.0 is out!

Postby Jonge » Mar 19, 2014 21:21

Still having some trouble making this work:

Code: Select all

#Include "ext/graphics/font.bi"
#include "ext/graphics/png.bi"

using ext

Dim MyFontImage As FB.IMAGE Ptr
Dim As String FileName
Dim As UInteger Col
Dim As Integer FontSize

ScreenRes 640, 480, 32

Input "FileName: ", Filename
Input "Font size: ", FontSize
If FontSize = 0 Then FontSize = 12

Col = RGB(255,255,255)

Var ReturnValue = ext.gfx.font.LoadTTF(FileName, MyFontImage, 1, 128, FontSize, Col)
If ReturnValue = 0 Then
   Print "Error when loading font."
   Sleep
   End
End If

Draw String (10,50), "Hello world! iiiii", RGB(255,0,0), MyFontImage, Alpha
Draw String (10,100), "Hello world!", RGB(255,255,255), MyFontImage

Mid(FileName, Len(FileName) - 3) = "    "
FileName =  "Font\" + Trim(FileName) & "_" & FontSize & ".png"

ext.gfx.png.save(FileName, MyFontImage)

Sleep


Error message:

Code: Select all

C:\Dev\FreeBASIC-0.90.1-win32\fbc -exx "Font.bas"
Font.o:fake:(.text+0x5e): undefined reference to `EXT::GFX::PNG::LOAD(FBSTRING const&, EXT::GFX::TARGET_E)@8'
Font.o:fake:(.text+0x83): undefined reference to `EXT::GFX::PNG::LOAD_MEM(void*, unsigned int, EXT::GFX::TARGET_E)@12'
Font.o:fake:(.text+0xbb): undefined reference to `EXT::GFX::GETDRIVER(FBSTRING&, EXT::GRAPHICSLOADER*)@8'
C:\Dev\FreeBASIC-0.90.1-win32\bin\win32\ld.exe: Font.o: bad reloc address 0x0 in section `.ctors'
C:\Dev\FreeBASIC-0.90.1-win32\bin\win32\ld.exe: final link failed: Invalid operation

Build error(s)


Is this file "libext-z-win32.a" the same as "libz.a"? The file "libjpeg.a" is not located in the download, I did find it in FreeBasic downloads section though. The error goes away when I remove the two lines that use the png library part, so I'm guessing its got something to do with libz.a..

Edit: Also there's a problem with some of the font images created with LoadTTF, if you create a font image from the Windows font "tahoma.ttf" and the size 16, then the "i" character contains a part of the "j" character. I have seen this with a different font also.
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Re: Extended Library 0.5.0 is out!

Postby sir_mud » Mar 21, 2014 15:57

libext-z-win32.a is just a statically compiled zlib for windows, it is used by default unless you define the option FBEXT_USE_ZLIB_DLL, again you would need to have ext's bin dir in the compiler search path (with -p) or put bin/*.a in fb's lib dir. As for the linking error, the issue there is with .90's const handling and (should) be fixed in fbc's master branch.
wallyg
Posts: 84
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: Extended Library 0.5.0 is out!

Postby wallyg » Oct 06, 2014 23:11

I was trying to re-work an old project that used ext/xml using the new fbc 1.00 version. I got a bunch of loading errors. After researching this a little on the forum, I see a comment that the ext library will never work with fbc 0.90.x.

Does this mean that I can no longer use the xml code in the library if I want to continue to use 1.00? Or will it be updated sometime in the future?
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Re: Extended Library 0.5.0 is out!

Postby sir_mud » Oct 22, 2014 2:24

I'm gonna take a look this weekend and try to get everything working with 1.0. I've been pretty busy lately, with work, family and making a game with dr_d. I've had a chance to briefly look over the changelog and it looks like it should be fairly easy to get it going again. I also have a standalone version of the xml lib that should work as is if you wanna give it a go in the mean time. https://code.google.com/p/libfbconfig/s ... /#hg%2Fsrc the xxmlpriv files are what you need.
wallyg
Posts: 84
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: Extended Library 0.5.0 is out!

Postby wallyg » Sep 04, 2015 17:38

sir_mud wrote:I'm gonna take a look this weekend and try to get everything working with 1.0. I've been pretty busy lately, with work, family and making a game with dr_d. I've had a chance to briefly look over the changelog and it looks like it should be fairly easy to get it going again. I also have a standalone version of the xml lib that should work as is if you wanna give it a go in the mean time. https://code.google.com/p/libfbconfig/s ... /#hg%2Fsrc the xxmlpriv files are what you need.


I was just wondering if you ever got the Extended Library to work with 1.03.

Thanks,
Wally
henry75
Posts: 1
Joined: May 30, 2016 2:36

hope the ext library will be update, thanks

Postby henry75 » May 30, 2016 2:42

I hope the ext library will be update to work on fb 1.05,
thnaks.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 4 guests