mk-soft wrote: Wed Jan 10, 2024 7:36 pm
User Library only makes sense if you program your own functions and controls in 'C' and include the headers from the Purebasic SDK.
Thus the user libraries can also be recompiled with 'C' with a new version of the Purebasic SDK and pblibrarymaker. I do not mean here the 'C' backend of Purebasic!
But I haven't tried it myself yet
Doesn't work due to missing headers. I wanted to implement a feature that I'd like to have and directly deliver the source with it such that Fred has less work to do if he decides to include that feature.
But that reason might not be valid enough. The Userlib hell would still exist with all static libs that have dependencies. No matter if written with C or PB.
Last edited by DarkDragon on Wed Jan 10, 2024 8:37 pm, edited 2 times in total.
skywalk wrote: Wed Jan 10, 2024 8:35 pm
Will PB transpiled C code ever be compiled as a static lib?
That is on my wish list.
Yes, dll is available, but more files to manage.
With static libs you have to distinguish between those including all dependencies and those which don't. First ones could potentially fail during interop with PureBasic again (duplicate symbols), latter ones fail when used outside PureBasic (missing symbols).
Those including dependencies could also be against the rules, as it's against the wrapper rule.
Yes, I ran across conflicts in the past and solved it with Prototypes or modified Import?
Can't remember exact details.
But, can't the few dependencies be renamed with a namespace prefix?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
skywalk wrote: Wed Jan 10, 2024 9:05 pm
Yes, I ran across conflicts in the past and solved it with Prototypes or modified Import?
Can't remember exact details.
But, can't the few dependencies be renamed with a namespace prefix?
You can hide symbols by obfuscation or direct addressing without going over a symbol at all of course, but I've never done it with precompiled libraries. I'm not sure if that functionality is implemented for all linkers/platforms PureBasic relies on.
With ld you can add the parameter --retain-symbols-file and pass a file listing symbols to keep.
1. Although I only program for myself, I would be very reluctant to install 3-party closed source software. So far I have always resigned myself to having a worse or no solution. And yes, I know PB itself is closed source in large parts.
2. I use a "big" include file, which I integrate in different projects. Unfortunately it happens to me again and again that I make (unintentionally incompatible) changes, which then fall on my feet in other "projects".
Here I could imagine that a "pre-compiled" lib would protect me from carelessly (on the fly) incorporating a change.
Currently I set the include file to readonly. (Unfortunately, the IDE does not support read only files - you will see if you change something......)
Conclusion:
Why not create the possibility of creating libraries and include a "how to create a library with PB".
But it should be possible with PB's own resources. The installation of arbitrary C compilers would - from my point of view - not be helpful.
I am sure, everyone can decide for themselves whether to use such a lib without source or not.
And honestly, I think Fred has already formed his opinion.
Just because it worked doesn't mean it works. PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
BarryG wrote: Thu Apr 18, 2024 10:14 pm
Say what? Yes, it does. I have dozens of read-only files included in my source. Have used them for years.
We have a differnt understanding about support. I dont known the command for changing the attribute read only in the ide.
Sure you can open and compile a read only file. That is what I do as well.
Just because it worked doesn't mean it works. PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Axolotl wrote: Thu Apr 18, 2024 2:59 pm
A few thoughts from me to the initial question.
1. Although I only program for myself, I would be very reluctant to install 3-party closed source software. So far I have always resigned myself to having a worse or no solution. And yes, I know PB itself is closed source in large parts.
2. I use a "big" include file, which I integrate in different projects. Unfortunately it happens to me again and again that I make (unintentionally incompatible) changes, which then fall on my feet in other "projects".
Here I could imagine that a "pre-compiled" lib would protect me from carelessly (on the fly) incorporating a change.
Currently I set the include file to readonly. (Unfortunately, the IDE does not support read only files - you will see if you change something......)
Conclusion:
Why not create the possibility of creating libraries and include a "how to create a library with PB".
But it should be possible with PB's own resources. The installation of arbitrary C compilers would - from my point of view - not be helpful.
I am sure, everyone can decide for themselves whether to use such a lib without source or not.
And honestly, I think Fred has already formed his opinion.
To be able to produce a static LIB from it's own programing language is a must for a language that call itself a "Powerful , Native, Fast, small binary" compiler language.
Purebasic , feel the pure power, native , and fast , small exe size, now with many limitation bother neck , thousands of missing feature.
moricode wrote: Sat Apr 20, 2024 3:37 am
To be able to produce a static LIB from it's own programing language is a must for a language that call itself a "Powerful , Native, Fast, small binary" compiler language.
Purebasic , feel the pure power, native , and fast , small exe size, now with many limitation bother neck , thousands of missing feature.