Page 3 of 4

Posted: Fri Sep 12, 2008 11:20 pm
by srod
Look 3 posts up for the coffIT link.

Posted: Sat Sep 13, 2008 8:31 am
by energy
srod...
its not working for me.
Im using PB4.2 Final and yur latest Coffit...
Send yu PM with whole code!
cheers eNerGy

Posted: Sat Sep 13, 2008 11:35 am
by srod
Well, coffIT works fine here on the entire program you sent me (on XP and Vista).

The only thing I will say is that you haven't followed the 'rule' where comments are concerned!!! You need to read the instructions for that. Still, I would expect any problem with this to be reflected on my system.

Now what you need to do is get coffIT to create a log file and then send me a copy of that file (after coffIT fails to work) as well as a copy of the error message being produced. If it is a Fasm message then it should detail the exact asm instruction which is playing silly buggers! :) In this case I would have to ask which version of Fasm your installation is using? I have chopped and changed mine around so much that I could well be using a different version than you!

Posted: Sat Sep 13, 2008 5:39 pm
by srod
Okay - problem sorted!!!

CoffIT prepends the name of the source file being worked on to all symbols being made public for the sake of sharing amongst all the different .obj files. If your source file name contains some weird characters then FASM may well blow a gasket or two! You've been warned! :wink:

Posted: Sat Jan 17, 2009 8:31 pm
by netmaestro
Using CoffIT 2 beta 1 for PB 4.3 downloaded from nxSoftware today, I played with it a bit on WinXP / PureBasic 4.3 final and tried a couple of examples. All went fine until suddenly CoffIT lost the capacity to find the Purebasic compiler. Now no matter what I try every time I execute CoffIT I get a messagebox saying "Cannot locate Purebasic Compiler". I've reinstalled PB, re-unzipped CoffIT into a clean folder, restarted the computer, added the Purebasic\compilers folder into my global PATH, put CoffIT.exe in the same folder with PBCompiler.exe, nothing helps at all.

Posted: Sat Jan 17, 2009 8:45 pm
by srod
Yes I think I encountered this a few days ago and fixed it; I haven't gotten around to uploading the fix though. Seems to be a registry issue. Let me upload a new version for PB 4.3......

Posted: Sat Jan 17, 2009 8:46 pm
by netmaestro
Would it be possible for CoffIT, upon failing to find the path, to ask me for it as an alternative to shooting me in the head with a messagebox?

Posted: Sat Jan 17, 2009 8:57 pm
by srod
netmaestro wrote:Would it be possible for CoffIT, upon failing to find the path, to ask me for it as an alternative to shooting me in the head with a messagebox?
Haven't time to work on CoffIT at the moment I'm afraid so the answer has to be no, even for what is a minor request - sorry.

Try downloading the PB 4.3 version now netmaestro. See if that works?

**EDIT : are you using XP or Vista?

Posted: Sat Jan 17, 2009 8:59 pm
by netmaestro
Thanks, tried the new version and it works. Using XP.

Posted: Sat Jan 17, 2009 9:01 pm
by srod
netmaestro wrote:Thanks, tried the new version and it works. Using XP.
Yes it was on XP that the problem arose. It would seem that PB 4.3 placed it's registry entries into a different key; at least a key that was different for XP. My code for retrieving the PB path was simply a little out of date! :)

Posted: Sun Feb 15, 2009 3:05 pm
by Justin
This seems a great tool, i've never used static libs. Can someone post the steps to use it in Visual C++?
I include the .lib in the project and put a declaration for the function but it says unresolved external function.

Posted: Sun Feb 15, 2009 9:15 pm
by srod
Have you read the CoffIT manual?

If not, then it explains the pitfalls of attempting to use an MSCOFF object file created by Purebasic with another programming language.

Basically, if you wish to do this then you have to avoid using any Purebasic commands which reside in a PB external library. For example, if your code uses Purebasic's Random() function, then any .obj/.lib file you create will not carry to other development tools unless you also carry across PB's 'misc' user library because this is where the code for the Random() function sits. Now, PB's user-libraries are not standard COFF files and so you are stuck because it is not possible to extract the COFF file containg the Random() function.

If you avoid such dependencies then it is possible to carry across your CoffIT created object files to other development tools. I have done this with some simple ASM projects. Visual c++ is a different animal though!

Posted: Sun Feb 15, 2009 10:38 pm
by Justin
Yes i read the manual :D , i don't plan to use pb library commands.

I just tried the Incremental.pb example, copied the lib into my project and added it among with a header file containing the function declaration.
Then i set the MS Compiler to compile the lib in the lib properties,( i have no idea of what switchwes to use), then i build the project and said unresolved external symbol when compiling the lib.

I wonder if you or anyone has succeded doing this or i'm missing something.

Posted: Mon Feb 16, 2009 11:30 am
by srod
I used that very example in an ASM project for a test (using GoASM). It was quite a while ago now I must admit, but it worked fine.

Posted: Mon Feb 16, 2009 2:59 pm
by SFSxOI
I noticed in the PB 4.3 version of the coffIT help file, in the 'Exporting Functions' section, you use this example:

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
For PB 4.3, should that not be: ProcedureDLL.i instead of .l ?

(the .l is used in other examples also in the help)