Page 1 of 2
Add the creation of static libraries (lib) and drives (sys)
Posted: Sun Mar 18, 2012 9:57 am
by User_Russian
Offered to add the creation of static library (lib), the object files (obj) and drivers (sys) at least in the Windows version.
If you can create a dynamic library (dll), then I think that does not have any problems with the creation of static (lib).
Drivers kernel mode (sys) can be created using slightly modified PureBasic.
http://www.purebasic.fr/english/viewtop ... 14&t=49195
Why then is not officially add this feature in PureBasic?
Re: Add the creation of static libraries (lib) and drives (s
Posted: Sun Mar 18, 2012 7:12 pm
by idle
+1 for static libs
Re: Add the creation of static libraries (lib) and drives (s
Posted: Sun Mar 18, 2012 8:41 pm
by ts-soft
The problem with static libs is, all pb functions are included
and usable by any other user, without a license of PB.
If the lib doesn't include the pb functions, he works only
with PB and this makes no sense for me.
Re: Add the creation of static libraries (lib) and drives (s
Posted: Sun Mar 18, 2012 8:45 pm
by jack
yes, but that also applies to DLL's, except you have the telltale of the DLL in the package.
Re: Add the creation of static libraries (lib) and drives (s
Posted: Sun Mar 18, 2012 9:14 pm
by ts-soft
In a DLL i can see only exported functions, in a static lib i can see and use all functions.
Re: Add the creation of static libraries (lib) and drives (s
Posted: Sun Mar 18, 2012 9:40 pm
by IdeasVacuum
In a DLL i can see only exported functions, in a static lib i can see and use all functions.
Wouldn't it be possible to output a static lib that only matched the DLL functions?
Re: Add the creation of static libraries (lib) and drives (s
Posted: Sun Mar 18, 2012 10:09 pm
by ts-soft
You can easy dump all symbols, not only exported symbols!
You can use PODUMP or POLIB. I use a Plugin for TotalCommander.
There is no way to hide the symbols in a static lib.
You can extract what ever you requires from lib with explode.
Re: Add the creation of static libraries (lib) and drives (s
Posted: Mon Mar 19, 2012 12:44 am
by skywalk
How does PowerBasic create static libs? They are notorious defenders of the bottom line...
Re: Add the creation of static libraries (lib) and drives (s
Posted: Mon Mar 19, 2012 1:16 am
by ts-soft
I think PowerBasic uses only API and no Libs, like PureBasic does.
FreeBasic for example requires libbfd.a as own lib. In a Freeware
no problem.
PB requires some libs (the libs in pb and the userlibs are all static libs, only compressed),
stringmanager and so on. A static lib, create with pb, without the stringmanager can
not use any string

This have nothing to do with notorious defenders
TailBite creates Static Libs, but without including the Libs from PB.
This libs doesn't work in other languages, so this is available but
useless.
Re: Add the creation of static libraries (lib) and drives (s
Posted: Mon Mar 19, 2012 3:28 am
by jack
there's an application that converts DLL's to static lib's
http://www.binary-soft.com/dll2lib/dll2lib.htm but way too expensive, Sapero from the ionic wind forums had a free utility to convert a DLL into a static lib, but I never tried it and don't know how good it was.
Re: Add the creation of static libraries (lib) and drives (s
Posted: Mon Mar 19, 2012 10:54 am
by gnozal
skywalk wrote:How does PowerBasic create static libs? They are notorious defenders of the bottom line...
Iirc, Powerbasic static libs (SLL) are only usable with Powerbasic.
These are not standard COFF lib files.
jack wrote:...Sapero from the ionic wind forums had a free utility to convert a DLL into a static lib, but I never tried it and don't know how good it was.
I think it was a sort a DLL loader from memory, like
Joachim Bauch's tools, and not a real converter.
Re: Add the creation of static libraries (lib) and drives (s
Posted: Mon Mar 19, 2012 2:37 pm
by skywalk
If I only want to use the lib in PB?
Is Tailbite documented and approved by PureBasic license?
I can see advantage of reducing code required to compile while debugging.
But I don't want to use a static lib if the process is unsupported.
It should be native.
Re: Add the creation of static libraries (lib) and drives (s
Posted: Mon Mar 19, 2012 3:28 pm
by DarkDragon
Obfuscation would be a solution: when compiling the static lib, rename all pb internal symbols to something random. Besides this, there must be some kind of export table which you can modify, even for libs.
Re: Add the creation of static libraries (lib) and drives (s
Posted: Mon Mar 19, 2012 4:52 pm
by xorc1zt
purebasic compile the code as one object, very annoying to produce a decent lib.
Re: Add the creation of static libraries (lib) and drives (s
Posted: Mon Mar 19, 2012 7:50 pm
by ts-soft
xorc1zt wrote:purebasic compile the code as one object, very annoying to produce a decent lib.
This is not correct, pblibs and userlibs a splittet in many objects.