Page 2 of 3
Hmm..
Posted: Wed Mar 03, 2004 8:06 pm
by Iria
Hiya,
First off can someone tell me if Im correct in thinking:
My understanding of a static library, is a library that is built statically so that programs that use functions within the library, when being linked pull the object code from the static library into the executable program.
This makes executables large (as they now include the library function object code) and programs run with the versions of library functions they were compiled/linked with?
Ok if the above is correct...can you help me out on my questions
Most windows libraries are of the dynamic sort?
If I have a library which is dynamic I cannot use this tool to link it in as its not the right sort?
Is there a way of making the DLL static other than recompiling as a static library?
Does anyone have a good location for static libraries that I can go play with
Finally would this tool work with Linux static libraries?
Phew..
Hope you can help

Posted: Thu Mar 04, 2004 2:27 pm
by freak
ricardo:
I'm afraid, i have some bad news. The whole thing only works with .lib
files, that are compatible to lcclink. (because that is what PB uses to link
the final exe)
I couldn't get it to work with your lib either, so i guess it's one of those
who are not compatible.
Iria:
Yes, what you say on top is correct.
> Most windows libraries are of the dynamic sort?
Yes, those are dlls. Windows programs make lot's of use of them.
> If I have a library which is dynamic I cannot use this tool to link it in as its not the right sort?
nope.
> Is there a way of making the DLL static other than recompiling as a static library?
See one of ricardo's earlier posts, he linked to a tool, that can make a
.lib out of a dll.
I can't test if it works with my tool though.
> Does anyone have a good location for static libraries that I can go play with
Well, the masm32 package mentioned above does have some, but i didn't
play around with them yet.
Some dll projects (like zlib for example) also do provide a static library,
you'll just have to search for them.
> Finally would this tool work with Linux static libraries?
I don't think so.
I don't have enough knowledge to create such a tool for linux.
Timo
Cheers
Posted: Thu Mar 04, 2004 2:59 pm
by Iria
Thanks for the reply
More importantly thanks for the tool

WHOOP!
..
Posted: Fri Mar 05, 2004 1:13 am
by NoahPhense
[edited]

general question
Posted: Fri Mar 05, 2004 1:17 am
by NoahPhense
Timo,
General question, if you can answer it..
That library file (in the compilers directory) that is created when
we make a standard PureBasic DLL. Can that be used with any
language?
- john
Posted: Fri Mar 05, 2004 1:56 am
by Dare2
NoahPhense, thanks for that info!
* whistles a happy tune *
Posted: Fri Mar 05, 2004 2:07 am
by ricardo
freak wrote:ricardo:
I'm afraid, i have some bad news. The whole thing only works with .lib
files, that are compatible to lcclink. (because that is what PB uses to link
the final exe)
I couldn't get it to work with your lib either, so i guess it's one of those
who are not compatible.
There are not any workaround this?
Posted: Fri Mar 05, 2004 2:31 am
by freak
NoahPhense:
It doesn't work the way you try it. sorry.
The Purebasic.lib file created when making a dll is not static library. It is,
what is called an import library. These are librarys, that only contain
functions to call the real dll through early binding. (this means, the dll is
loaded at the start of the program, you don't have to call a command for that.
So these libs are basically just wrappers to the dll, so you can call them easier.
(the PureBasic.lib file is intended to be used with other languages to easily
access the dll)
So... what you just created with my tool is a wrapper of a wrapper of the dll.
(try to remove the created dll from the compilers directory, and it should stop working.)
You should use El_Choni's tool to create PB libs out of your own code. Mine
is intended to import 3rd party libs, where you don't have a source.
(btw: nice red colors (
err brown) . I guess i'll use white from now on

)
ricardo:
i'm still on it. I'm not even sure, if your lib is really incompatible, or if there
is a way around. I'll keep looking.
I'm just very short on free time, so it might take a while
Timo
Posted: Sat Mar 06, 2004 7:15 pm
by Num3
Hi all...
Just found this little shareware that converts DLL into Static Libs !!!
I'm performing test now to see if it works fine with Fr34k proggy
http://www.binary-soft.com/dll2lib/d2l.exe
Posted: Sat Mar 06, 2004 9:17 pm
by ricardo
I reference it at the beggining of this post thread and try to test the tool, but fails and Freak answer me that maybe the libs are incompatible
I hope he find some workaround!!
Posted: Sat May 08, 2004 1:15 am
by Karbon
Freak, any hope that you'll make this work with the new linker?

Posted: Sat May 08, 2004 1:35 am
by freak
umm...oh... didn't even try that with the new linker yet... :roll:
I'll see what can be done.
Timo
Posted: Wed May 12, 2004 10:26 pm
by Karbon
Motivation : All the beer you can drink.. Just add it to Fred's tab.
Posted: Fri May 14, 2004 12:04 am
by Max.
@ Freak
Great idea and excellent work. I did a (very short) test with the iSEDQuickPDF Library and it seems as if it works well!
A small request, if you don't mind...
...is it possible to add a kind of project handling, allowing one to save the functions and load them later again to add functions or edit descriptions? It would also make it easy to exchange the definitions amongst users, while sharing the User Libraries might sometimes not be possible due to legal reasons.
Posted: Fri May 14, 2004 12:05 am
by Karbon
SedTech is also distributing a PureBasic file with all the functions defined.. Check out the distro zip..