Marek Luch Guest
|
Posted: Sat Sep 27, 2003 5:55 pm Post subject: Using generated asm files in projects |
|
|
Hi,
I'd like to make BCB generate asm files from the cpp ones (so I can make
some modifications to them) and later assemble and link them into the final
executable. During the painful process of learning how to do it in BCB (the
help, while being very helpful and verbose at other times, doesn't help with
almost no information on the subject) I've made the following observations:
As for the generation of asm files, I've used the -S param directly in the
IDE and got a strange "(file) contains invalid OMF record, type 0x09" linker
error. I've inspected the created obj files and to my surprise found that
the IDE had indeed created the assembly files, but they were renamed to the
obj's! No wonder the linker protested when it tried to process asm files.
This happens on both BCB5 and 6 (I've heard someone complaining about this
in BCB6 on another newsgroup)
This param works fine in the makefile.
Another thing I've noticed is the badly chosen default case sensitivity on
symbols param for tasm - /mx, where it should be /ml. This often leads to
ambiguous "Fatal: error detected (IMP772)" message. Even the most simple
empty project generates the error, if the param is not changed. Funny thing
is that if you use -B param instead od -S, which, as stated, makes the
compiler generate
the ASM files and then assemble them using tasm, you won't get such error.
But if you do these operations manually (by using -S in the makefile) the
error occurs. Does this mean that tasm invoked with -B does not use the
specified flags?
The last thing is just plain cute - when the IDE exports a makefile it
doesn't include the correct BCB path. The path is fixed - it always points
at a directory one level up, so if the project is located eg. in a dir
inside the projects main directory (ie. always, because noone keeps all the
projects' files clustered in one directory) the make will fail, as the
project will be in a dir 2 levels down. Sure, you always need to change the
dir when you move the project dir elsewhere anyway, but when you export a
makefile you usually expect IDE to use the current dir, not some fixed one.
All in all, I've managed to use the generated asm files in the project, but
only via a makefile. If I remove the cpp files and add the asm substitutes
using the project manager, the IDE throws away any information that binds
the code files with the forms (vcl apps) - it changes USEFORM macros to
USEASM, which do not allow bindings, and removes the form creation code.
What
can I do to make it work in IDE?
thanks
M.L.
|
|