It is currently Sat May 25, 2013 3:53 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Add the creation of static libraries (lib) and drives (sys)
PostPosted: Sun Mar 18, 2012 9:57 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 215
Location: Russia
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. viewtopic.php?f=14&t=49195
Why then is not officially add this feature in PureBasic?

_________________
Library XP_Menu_Lib - office menu; HID_Lib - USB Library
Torrent client - pbTorrent (source code); Create driver in PureBasic.


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Sun Mar 18, 2012 7:12 pm 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 2488
Location: New Zealand
+1 for static libs


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Sun Mar 18, 2012 8:41 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 4715
Location: Berlin - Germany
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.

_________________
PureBasic 5.11 | Windows 7 SP1 (x64) | Mageia 3 (x64) | RealSource

The use of EnableExplicit is free of charge and avoids errors.


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Sun Mar 18, 2012 8:45 pm 
Online
Addict
Addict

Joined: Fri Apr 25, 2003 11:10 pm
Posts: 852
yes, but that also applies to DLL's, except you have the telltale of the DLL in the package.


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Sun Mar 18, 2012 9:14 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 4715
Location: Berlin - Germany
In a DLL i can see only exported functions, in a static lib i can see and use all functions.

_________________
PureBasic 5.11 | Windows 7 SP1 (x64) | Mageia 3 (x64) | RealSource

The use of EnableExplicit is free of charge and avoids errors.


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Sun Mar 18, 2012 9:40 pm 
Offline
Addict
Addict

Joined: Fri Oct 23, 2009 2:33 am
Posts: 2864
Location: Wales, UK
Quote:
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?

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Sun Mar 18, 2012 10:09 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 4715
Location: Berlin - Germany
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.

_________________
PureBasic 5.11 | Windows 7 SP1 (x64) | Mageia 3 (x64) | RealSource

The use of EnableExplicit is free of charge and avoids errors.


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Mon Mar 19, 2012 12:44 am 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 1387
Location: Boston, MA
How does PowerBasic create static libs? They are notorious defenders of the bottom line...

_________________
To understand recursion, you must first understand recursion. ~ unknown
I never make stupid mistakes. Only very, very clever ones. ~ John Peel


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Mon Mar 19, 2012 1:16 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 4715
Location: Berlin - Germany
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 :wink:
This have nothing to do with notorious defenders :lol:

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.

_________________
PureBasic 5.11 | Windows 7 SP1 (x64) | Mageia 3 (x64) | RealSource

The use of EnableExplicit is free of charge and avoids errors.


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Mon Mar 19, 2012 3:28 am 
Online
Addict
Addict

Joined: Fri Apr 25, 2003 11:10 pm
Posts: 852
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.


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Mon Mar 19, 2012 10:54 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
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.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Mon Mar 19, 2012 2:37 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 1387
Location: Boston, MA
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.

_________________
To understand recursion, you must first understand recursion. ~ unknown
I never make stupid mistakes. Only very, very clever ones. ~ John Peel


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Mon Mar 19, 2012 3:28 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 02, 2003 9:16 am
Posts: 1917
Location: Germany
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.

_________________
bye,
Daniel

http://www.bradan.eu/


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Mon Mar 19, 2012 4:52 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Jul 09, 2011 7:57 am
Posts: 276
purebasic compile the code as one object, very annoying to produce a decent lib.

_________________
http://www.mediafire.com/pbstuff


Top
 Profile  
 
 Post subject: Re: Add the creation of static libraries (lib) and drives (s
PostPosted: Mon Mar 19, 2012 7:50 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 4715
Location: Berlin - Germany
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.

_________________
PureBasic 5.11 | Windows 7 SP1 (x64) | Mageia 3 (x64) | RealSource

The use of EnableExplicit is free of charge and avoids errors.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye