Wierd FBEXT LoadImage Bug

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
Post Reply
qbworker
Posts: 73
Joined: Jan 14, 2011 2:34

Wierd FBEXT LoadImage Bug

Post by qbworker »

This code:

Code: Select all

#Include Once "ext/graphics/img_load.bi"
#Include Once "fbgfx.bi"

ScreenRes 320, 200

Dim As fb.IMAGE Ptr someimage = ext.LoadImage("somerandomimage.png")

Put (0, 0), someimage, Trans 

sleep
Produces this error:
FbTemp.o:fake:(.text+0xd0): undefined reference to _ZN3EXT9LOADIMAGEERK8FBSTRING@4'
But when you replace:
#Include Once "ext/graphics/img_load.bi"
with:
#Include Once "ext/graphics.bi"
It works and you get a warning about 'vector2d.bi' being deprecated.
P.S. replace 'someimage.png' in the code with a similar image name on your computer.
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Post by vdecampo »

Don't you need to Dim ext as something first?

-Vince
qbworker
Posts: 73
Joined: Jan 14, 2011 2:34

Post by qbworker »

Not that I know of. As I wrote If you replace
'#include "ext/graphics/img_load.bi"'
with
'#include "ext/graphics.bi"', it compiles and runs as it should.
sir_mud
Posts: 1402
Joined: Jul 29, 2006 3:00
Location: A van down by the river
Contact:

Post by sir_mud »

What version of ext are you using? The warning should be eliminated in the SVN version as the older vector api is only used in certain areas. *edit* Looks like the primitives are still using it, I'll update those. The ONLY difference in explicit inclib's would be the explicit inclib of libz in png.bi, it is implicitly required by the loadimage function. I added the individual format headers to be included with the img_load header and fixed the namespace, it's supposed to be in the ext.gfx namespace. It's fixed in SVN revision 1043 with this example:

Code: Select all

#Include Once "ext/graphics/img_load.bi"
ScreenRes 320, 200
Dim As fb.IMAGE Ptr someimage = ext.LoadImage("random.png")
Put (0, 0), someimage, Trans
sleep
Post Reply