indeed.musicandstamps wrote:Or am i missing the point
Compile a PB into PB library
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
>> Or am i missing the point
toolhelp in the ide
contexthelp with F1
unused functions not in the exe
userlib has own global variabel scope
private functions in userlib
and many more

toolhelp in the ide
contexthelp with F1
unused functions not in the exe
userlib has own global variabel scope
private functions in userlib
and many more

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
- User
- Posts: 17
- Joined: Sun Nov 12, 2006 3:22 pm
- Location: Great Britain
- Contact:
> Or am i missing the point 
Yes, because all uncalled procedures in that big include file will be compiled
into your app, making it bloated when there's no need. That's why many of
us want uncalled procedures NOT to be included in the compiled executable.

Yes, because all uncalled procedures in that big include file will be compiled
into your app, making it bloated when there's no need. That's why many of
us want uncalled procedures NOT to be included in the compiled executable.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
I thought there were tests done and only a stub was included for uncalled procedures not the whole code?PB wrote:> Or am i missing the point
Yes, because all uncalled procedures in that big include file will be compiled
into your app, making it bloated when there's no need. That's why many of
us want uncalled procedures NOT to be included in the compiled executable.
> I thought there were tests done and only a stub was included for uncalled
> procedures not the whole code?
Maybe not entire code, but strings and API calls are still included, even if
the procedures aren't called anywhere. My own tests confirmed that. In
an ideal PureBasic, none would be included at all.
> procedures not the whole code?
Maybe not entire code, but strings and API calls are still included, even if
the procedures aren't called anywhere. My own tests confirmed that. In
an ideal PureBasic, none would be included at all.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Definitely not the entire code - as established in the thread:PB wrote:> I thought there were tests done and only a stub was included for uncalled
> procedures not the whole code?
Maybe not entire code, but strings and API calls are still included, even if
the procedures aren't called anywhere. My own tests confirmed that. In
an ideal PureBasic, none would be included at all.
http://www.purebasic.fr/english/viewtop ... ht=include
However, all procedures referenced from other procedures (even if the 'parent' proc is not called) get included in the final exe. Same with api calls etc. For simplicity's sake I guess, bearing in mind that PB is a single pass compiler.
I may look like a mule, but I'm not a complete ass.
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
and that's one of the points.srod wrote:However, all procedures referenced from other procedures (even if the 'parent' proc is not called) get included in the final exe.
if I have a little Include with standalone procedures, everything is fine.
if I have a complex structure with a handfull of control-procedures called
from outside and dozends of internal procedures I will have almost the
complede Include included even if it is not used at all.
and the other point still remains:
what if I want to offer the Functionallity of my code to the Community, but not the Code itself?
and what if I additionally don't want to give away a DLL?
then I need to provide a UserLib, or keep that Functionallity for my own.
oh... and have a nice day.
Even earlier than that! 2001 anyone?:Kale wrote:This fear about closed libs has been raised before by lots of people! 2003 anyone?:
http://www.purebasic.fr/english/viewtopic.php?t=16195 :roll:
http://www.purebasic.fr/english/viewtopic.php?t=3380
http://www.purebasic.fr/english/viewtopic.php?t=3971
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
Kale wrote:Perhaps everybody should!Kaeru Gaman wrote:yo hey, do you think I search the forum for 4 year old threads everytime some topic occurs?
I can't see the point with that old threads, because so much has changed in the meantime.fsw wrote:Even earlier than that! 2001 anyone?:Kale wrote:This fear about closed libs has been raised before by lots of people! 2003 anyone?:
http://www.purebasic.fr/english/viewtopic.php?t=16195 :roll:
http://www.purebasic.fr/english/viewtopic.php?t=3380
http://www.purebasic.fr/english/viewtopic.php?t=3971
in 2001 you were programming in PB 2.00 - 2.70
and the point mentioned in the 2001 thread no.3380 was some totally different:
there was asked "why not write Libs in PB"
2003's thread was about LibMania - ok
I'd like to guide us back to topic:
Some (most?) of us think, a build-in LibCreator would be a good feature.
srod mentioned the Threadsafe/Unicode problem with Libs,
I think that is a point worth being discussed further.
oh... and have a nice day.
I agree and this feature should be built in as it is with ebasic.and the other point still remains:
what if I want to offer the Functionallity of my code to the Community, but not the Code itself?
and what if I additionally don't want to give away a DLL?
then I need to provide a UserLib, or keep that Functionallity for my own.
However, In the past I offered to share a 2D GUI I was working on and release it as a lib and I was flamed for my efforts by people demanding code and not a lib.
Still, this is a feature I would use, as I would use libs I create for my own use and not share them.
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
sure one can learn more from an OpenSource-Lib than from a ClosedSouce-Lib.Brice Manuel wrote:... I was flamed for my efforts by people demanding code and not a lib.
but after all it is your own decision how to publish it.
those who complain shout be aware, that providing code will always lead
to someone using your code and claiming it their own.
sure this is something to think about
- help others more to learn and accept your code will be misused
- or just provide functionallity and stand some complaints
you can't make it nice for everybody, and if you try too hard, they'll nail you to a tree someday....
oh... and have a nice day.
For PBOSL all Sources avalaible, but the most users only download the binaries.
Creating Libs in PB is a missing feature!
You can create your own libs in Delphi, XProfan, EBasic and so on, why not in PB?
Creating Libs in PB is a missing feature!
You can create your own libs in Delphi, XProfan, EBasic and so on, why not in PB?
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
