How to create a static library?

Everything else that doesn't fall into one of the other PB categories.
User avatar
Innesoft
Enthusiast
Enthusiast
Posts: 105
Joined: Mon Jan 18, 2010 10:30 am
Location: UK
Contact:

How to create a static library?

Post by Innesoft »

Probably a stupid question, but what are the steps needed to create a static library (.obj or .lib) from purebasic source, that can be linked in with polink? It would be nice to be able to create static libs too, even if it's a bit more work.

Also.. how would you then actually link the files together? I was playing around with PellesC and it doesn't seem to like FASM macros for some reason (bunch of errors about misuse of macros or something).

Can anyone shed some light on this?

What I know so far..
- how to use/code flat assembler
- both files need to be MSCOFF (I think?)
- polink does the magic

Thanks!
User avatar
idle
Always Here
Always Here
Posts: 6238
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: How to create a static library?

Post by idle »

Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: How to create a static library?

Post by Trond »

Innesoft wrote:Also.. how would you then actually link the files together? I was playing around with PellesC and it doesn't seem to like FASM macros for some reason (bunch of errors about misuse of macros or something).
:?: You can't use FASM macros with other software than FASM!
User avatar
Innesoft
Enthusiast
Enthusiast
Posts: 105
Joined: Mon Jan 18, 2010 10:30 am
Location: UK
Contact:

Re: How to create a static library?

Post by Innesoft »

yeah this is an old (ish) topic. issues resolved, thanks for the replies though. :wink:
Post Reply