coffIT - create obj and lib static libraries from PB source!
28/2/2008. Bug fix.
coffIT would crash out if the linker complained with an error when compiling a source file to a .obj file. An absurd thing to do when you think about it! Doh! :roll:
Have also added an example of how to use coffIT in conjunction with POLIB to create a static .lib file from multiple object files.
coffIT version 2 will do this automatically, but in the mean time ......
Download coffIT
@Milan : I've included a text file along with the new example giving step by step instructions on how to recreate the .lib file etc.
coffIT would crash out if the linker complained with an error when compiling a source file to a .obj file. An absurd thing to do when you think about it! Doh! :roll:
Have also added an example of how to use coffIT in conjunction with POLIB to create a static .lib file from multiple object files.
coffIT version 2 will do this automatically, but in the mean time ......
Download coffIT
@Milan : I've included a text file along with the new example giving step by step instructions on how to recreate the .lib file etc.
I may look like a mule, but I'm not a complete ass.
29/02/2008. Update - coffIT 1.0 beta 2.
In the event of a successful compilation, coffIT generated log files will now list all external functions / symbols required by the resulting .obj or .lib file etc.
This is useful when hoping to use your resulting static library in other programming languages etc.
This is on top of the coffIT generated Purebasic import wrappers which will list all Windows libraries required by the .lib etc.
Download coffIT
===================================
*EDIT : you're welcome Info.
In the event of a successful compilation, coffIT generated log files will now list all external functions / symbols required by the resulting .obj or .lib file etc.
This is useful when hoping to use your resulting static library in other programming languages etc.
This is on top of the coffIT generated Purebasic import wrappers which will list all Windows libraries required by the .lib etc.
Download coffIT
===================================
*EDIT : you're welcome Info.

I may look like a mule, but I'm not a complete ass.
04/03/2008. Update - coffIT 2.0 beta 1.
coffIT now offers MSCOFF .obj or MSCOFF static library (.lib) output formats.
I advise reading the relevant parts of the help manual regarding the choice of creating .obj or .lib files, because it is worth understanding how coffIT proceeds here as well as the reason why I would not necessarily suggest using .lib files!
Download coffIT
coffIT now offers MSCOFF .obj or MSCOFF static library (.lib) output formats.
I advise reading the relevant parts of the help manual regarding the choice of creating .obj or .lib files, because it is worth understanding how coffIT proceeds here as well as the reason why I would not necessarily suggest using .lib files!
Download coffIT
I may look like a mule, but I'm not a complete ass.
works fine, thank you
ps: only the ide-integration doesn't work, if there no other item!
greetings
Thomas

ps: only the ide-integration doesn't work, if there no other item!
greetings
Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Only my new PC works like a charm but i'm waiting for DSLsrod wrote: **EDIT : does this mean you're back?
greetings
Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
- PureBasic Expert
- Posts: 2812
- Joined: Fri Apr 25, 2003 4:51 pm
- Location: Portugal, Lisbon
- Contact:
So to avoid missing libraries you could code this right ?
(It's a very bad example i know)
In this specific example I guess the PB license is violated (at least when wrapping it's internal libraries) or am i wrong ?
(It's a very bad example i know)
Code: Select all
ProcedureDLL.l Rnd(value)
Protected a = Random(value) ;Here we use a command from PB's misc user library.
ProcedureReturn a
EndProcedure
Import "misc.lib"
EndImport
Well, such a static library (unlike a dll) would only be useable in a Purebasic application anyhow (because of the reliance on PB's Misc library) and so, in a sense, I don't suppose the PB licence is being broken on this occasion.
It's a fine line!
The following would be okay however since it is not a simple wrapper around the Random function:
Again though, only useable in a PB application anyhow because of the reliance on the Misc user library which other languages have no access to.
By the way, you cannot directly import Purebasic's Misc library using the Import / EndImport commands as the library itself is embedded within the 'Misc' user library. coffIT's generated PB wrapper imports it indirectly by creating some dummy code.

The following would be okay however since it is not a simple wrapper around the Random function:

Code: Select all
ProcedureDLL.l Rnd(value)
Protected a = Random(value) ;Here we use a command from PB's misc user library.
a + 1
ProcedureReturn a
EndProcedure
By the way, you cannot directly import Purebasic's Misc library using the Import / EndImport commands as the library itself is embedded within the 'Misc' user library. coffIT's generated PB wrapper imports it indirectly by creating some dummy code.
I may look like a mule, but I'm not a complete ass.
09/03/2008. Bugfix.
When creating a static .lib, coffIT (more precisely, Fasm!) would crash out if a 'Data' statement contained repeated addresses of the same procedure.
Download coffIT
When creating a static .lib, coffIT (more precisely, Fasm!) would crash out if a 'Data' statement contained repeated addresses of the same procedure.
Download coffIT
I may look like a mule, but I'm not a complete ass.
CoffiT reported:
Illegal Intsruction in the following Procedure:
Anyone knows why?
Thnax in forward...
Illegal Intsruction in the following Procedure:
Anyone knows why?
Thnax in forward...
Code: Select all
Procedure UpdateSampleDelta(nexttime.l, time.l, usecs.l, td2.l, *smplrem.Long, *smpldelta.Long)
; performs 64bit (nexttime-time)*usecs/td2 And a 32.32bit addition To smpldelta:smplrem
!MOV Eax, [p.v_nexttime]
!SUB Eax, [p.v_time]
!MOV Ebx, [p.v_usecs]
!MUL Ebx
!MOV Ebx, [p.v_td2]
!DIV Ebx
!MOV Ecx, [p.p_smplrem]
!ADD [Ecx], Edx
!ADC Eax, 0
!MOV Ecx, [p.p_smpldelta]
!MOV [Ecx], Eax
EndProcedure