Using external library libg2
Posted: Wed Aug 04, 2004 4:35 pm
Hello,
I'm trying to use (on Xandros Linux/Debian) the library libg2 (simple 2D graphics):
Writing a PBL-File for the DLL Importer (only the funkctions for a small exapmle program):
;-----------------------------
; PureBasic libg2 importer
;
libg2
g2_open_PS 3 ; int,enum,enum
g2_line 5 ; int,double,double,double,double,double
g2_close 1 ; int
;-----------------------------
With this a LIB-File in /purelibraries/linux is created.
Trying this example-code:
; ------------------------------------------------------------
;
; PureBasic - libg2 (Linux) example file
;
; ------------------------------------------------------------
;
Procedure g2_Output()
Protected d.l, file.s
d = g2_open_PS_("simple.ps", 4.0, 1.0) ;d=g2_open_PS("simple.ps", g2_A4, g2_PS_port)
g2_line_(d, 10.0, 10.0, 90.0, 90.0) ;g2_line(d, 10, 10, 90, 90)
g2_close_(d) ;g2_close(d);
EndProcedure
MessageRequester("libg2-example", "Testing.............................", 0)
g2_Output()
End
; ----------------------------------------------------------------------------
If one of the libg2-functions is used, the compiler doesn't make the program - nothing happens.
Does anybody knows why? Thanks!
Regards,
Markus
I'm trying to use (on Xandros Linux/Debian) the library libg2 (simple 2D graphics):
Writing a PBL-File for the DLL Importer (only the funkctions for a small exapmle program):
;-----------------------------
; PureBasic libg2 importer
;
libg2
g2_open_PS 3 ; int,enum,enum
g2_line 5 ; int,double,double,double,double,double
g2_close 1 ; int
;-----------------------------
With this a LIB-File in /purelibraries/linux is created.
Trying this example-code:
; ------------------------------------------------------------
;
; PureBasic - libg2 (Linux) example file
;
; ------------------------------------------------------------
;
Procedure g2_Output()
Protected d.l, file.s
d = g2_open_PS_("simple.ps", 4.0, 1.0) ;d=g2_open_PS("simple.ps", g2_A4, g2_PS_port)
g2_line_(d, 10.0, 10.0, 90.0, 90.0) ;g2_line(d, 10, 10, 90, 90)
g2_close_(d) ;g2_close(d);
EndProcedure
MessageRequester("libg2-example", "Testing.............................", 0)
g2_Output()
End
; ----------------------------------------------------------------------------
If one of the libg2-functions is used, the compiler doesn't make the program - nothing happens.
Does anybody knows why? Thanks!
Regards,
Markus