Got an idea for enhancing PureBasic? New command(s) you'd like to see?
traumatic
PureBasic Expert
Posts: 1661 Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:
Post
by traumatic » Thu May 26, 2005 8:52 am
This has been discussed some times before but never made its way into
the feature requests IIRC.
It would be nice to ease the linking of external libraries, especially now
that PureBasic (POLINK) supports COFF.
Something like:
Code: Select all
Extern "_foo@8" In "bar.lib" As "Foo(a.l, b.f)"
Don't know about the syntax
Good programmers don't comment their code. It was hard to write, should be hard to read.
dell_jockey
Enthusiast
Posts: 767 Joined: Sat Jan 24, 2004 6:56 pm
Post
by dell_jockey » Thu May 26, 2005 2:13 pm
I second Traumatics request, it would be very useful indeed.
Kale
PureBasic Expert
Posts: 3000 Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:
Post
by Kale » Thu May 26, 2005 4:16 pm
bit difficult for OOP Libs?
--Kale
traumatic
PureBasic Expert
Posts: 1661 Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:
Post
by traumatic » Thu May 26, 2005 4:20 pm
What are "OOP libs" ?
Good programmers don't comment their code. It was hard to write, should be hard to read.
Fred
Administrator
Posts: 18162 Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:
Post
by Fred » Thu May 26, 2005 5:24 pm
It's a good idea. Something like this ? Any input is welcome.
Code: Select all
Import "YourFavoriteLib.lib"
Function1.l(a.l) [As "_xxx@8" - StdCall/CDLEC ?]
..
EndImport
Dare2
Moderator
Posts: 3321 Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land
Post
by Dare2 » Thu May 26, 2005 5:41 pm
How about:
Code: Select all
LinkWith "path\file.obj"
CallType functionName[.type] [par1.type [, par2.typ ...]]
eg
CallStd DoTaskA.l a.l, a.l, a.w ; this returns a long
CallStd DoTaskB a.s, a.l, a.b ; this returns nix
CallC DoTaskC.w a.f ; this returns a word
EndLink
If you implement this sort of thing then your choice of a platonic *kissy kissy* or not.
@}--`--,-- A rose by any other name ..
Polo
Addict
Posts: 2422 Joined: Tue May 06, 2003 5:07 pm
Location: UK
Post
by Polo » Thu May 26, 2005 6:08 pm
Import "YourFavoriteLib.lib"
Function1.l(a.l) [As "_xxx@8" - StdCall/CDLEC ?]
..
EndImport
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I want that !!!!!!!!!!!!!!!!
traumatic
PureBasic Expert
Posts: 1661 Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:
Post
by traumatic » Thu May 26, 2005 6:42 pm
Fred wrote: Code: Select all
Import "YourFavoriteLib.lib"
Function1.l(a.l) [As "_xxx@8" - StdCall/CDLEC ?]
..
EndImport
Perfect IMHO!
(err... this would crash btw
)
Bonne_den_kule:
I know what OOP is, yet don't know what "OOP libs" are supposed to be...
Good programmers don't comment their code. It was hard to write, should be hard to read.
Polo
Addict
Posts: 2422 Joined: Tue May 06, 2003 5:07 pm
Location: UK
Post
by Polo » Thu May 26, 2005 7:40 pm
And then of course, you will have to help El Chroni, because such a feature MUST be included in TailBite too
El_Choni
TailBite Expert
Posts: 1007 Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain
Post
by El_Choni » Thu May 26, 2005 8:09 pm
I'll do my homework, including updating TailBite when it's needed without bothering Fred (I hope)
El_Choni
Polo
Addict
Posts: 2422 Joined: Tue May 06, 2003 5:07 pm
Location: UK
Post
by Polo » Thu May 26, 2005 8:14 pm
Then it's even better, Tailbite is so good !
Althought, if Fred was agreeing to translate Tailbite to make it into pbcompiler, it would be even better, we would have Userlibraries making ability in Windows/Linux/Mac !!
Blade
Enthusiast
Posts: 362 Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:
Post
by Blade » Thu May 26, 2005 8:37 pm
And the option to include that library in the final exe is possible?
Polo
Addict
Posts: 2422 Joined: Tue May 06, 2003 5:07 pm
Location: UK
Post
by Polo » Thu May 26, 2005 8:39 pm
Blade wrote: And the option to include that library in the final exe is possible?
Well, this is what this thread is about
traumatic
PureBasic Expert
Posts: 1661 Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:
Post
by traumatic » Sun May 29, 2005 4:20 pm
Fred, without trying to be pushy, can you tell us for what release this feature is planned?
Good programmers don't comment their code. It was hard to write, should be hard to read.