The MASM Forum Archive 2004 to 2012

Project Support Forums => IDE Development and Support => RadAsm Support Forum => Topic started by: Fabio on October 25, 2009, 09:05:11 PM

Title: Radasm and bcc
Post by: Fabio on October 25, 2009, 09:05:11 PM
Hello, I have installed Radasm and the High Programming Pack, and I have compiled successfully the project example "TestWin.rap" using "bcc" as the programming language.

But I can't compile an added module with this basic content:



#include "TestWin.h"

int GimmeInteger() {
int a = 1;
return a;
}



So my question is, can we use modules when "bcc" is the target language?
Thank you in advance.
Title: Re: Radasm and bcc
Post by: KetilO on October 26, 2009, 11:33:27 AM
Hi Fabio

bcc certainy supports modules. See included project.

KetilO

Title: Re: Radasm and bcc
Post by: Fabio on October 29, 2009, 04:47:46 PM
Good news, KetilO. Thanks
Title: Re: Radasm and bcc
Post by: Fabio on October 29, 2009, 05:09:04 PM
Hello again... I'm trying to do the same under a different approach. Including a .h instead of a cpp, but I can't compile the project. I can't see what's wrong.
Title: Re: Radasm and bcc
Post by: KetilO on October 30, 2009, 08:45:59 AM
Hi Fabio

1. Modules that you want to compile into object files MUST be added to the project as Modules.
2. Compile the modules with Make / Compile module.

Included is the test project. Study the project options and the response file.
If someting is unclear I am shure you can search the net for info on the bcc compiler.

KetilO
Title: Re: Radasm and bcc
Post by: Fabio on October 30, 2009, 05:30:07 PM
KetilO, Thank you for taking the time to answer my questions :).
Your example suit my needs perfectly.
Very much appreciated, really.
Title: Re: Radasm and bcc
Post by: Fabio on November 08, 2009, 11:21:19 PM
Hello, I have added a few more modules in the example project, and after editing the changes in the Response file all work great, and by the way the Radasm IDE is a very nice editor.
I have a little more question about the module compilation... every time I choose the "compile module" from the "Make" menu it seems to compile "all" the modules.
Is this the normal behavior or there is a way to compile only the modified modules? I did make a search through the menus and the Radasm help file, but I can't find an answer.
Finally I want to apologize for my english, since I am not a native english speaker. Thank you!
Title: Re: Radasm and bcc
Post by: KetilO on November 09, 2009, 07:22:30 AM
Hi Fabio

There is no way to compile a single module.

KetilO
Title: Re: Radasm and bcc
Post by: Fabio on November 09, 2009, 08:25:27 AM
Hi, KetilO. Thanks for the info. Since I need to use around more than 10 modules I was thinking in replace the "Link" box in "Project Options" with a call to "Make.exe" and using a makefile.

If this is posible it will decrease the compiling time, since Make compile only the .cpp's more newer than the respectives .o.

I will try.
Title: Re: Radasm and bcc
Post by: Fabio on November 15, 2009, 08:09:53 PM
I post here a makefile to save compiling time, because it will compile only the modified sources.
In "Project Options" in any "Make Menu" command write:


5,O,$B\MAKE.EXE -f MAKEFILE


the makefile go in the project directory in a file with the name MAKEFILE without any extension.



# MAKEFILE

#----------------------------------------------------------------
# BASIC DATA
#----------------------------------------------------------------
EXENAME = TestDlg.exe
RESNAME = TestDlg.res
INCDIRS = "C:\Borland\BCC55\Include"
LIBDIRS = "C:\Borland\BCC55\Lib"


#----------------------------------------------------------------
# OBJECT LIST
#----------------------------------------------------------------
OBJECTS = DialogFunc.obj otromod.obj TestDlg.obj


#----------------------------------------------------------------
# OPTIONS
#----------------------------------------------------------------
MODOPTS = -c -tW -L$(LIBDIRS) -I$(INCDIRS)
EXEOPTS = /aa /c /x /Gn -L$(LIBDIRS) "C:\Borland\BCC55\Lib\c0w32.obj" $(OBJECTS)
IMPLIBS = import32.lib cw32.lib
todo: prog.exe


#----------------------------------------------------------------
# MODULE COMPILATION
#----------------------------------------------------------------
DialogFunc.obj: DialogFunc.cpp
BCC32.EXE $(MODOPTS) DialogFunc.cpp
otromod.obj: otromod.cpp
BCC32.EXE $(MODOPTS) otromod.cpp
TestDlg.obj: TestDlg.cpp
BCC32.EXE $(MODOPTS) TestDlg.cpp


#----------------------------------------------------------------
# TARGET COMPILATION
#----------------------------------------------------------------
prog.exe: $(OBJECTS)
ILINK32.EXE $(EXEOPTS), $(EXENAME),, $(IMPLIBS),, $(RESNAME)


# END OF MAKEFILE


every time I need to add a new module I just write the name in the OBJECT LIST section and add a rule in the MODULE COMPILATION section.

I know this is not a C forum but just in case someone can find this info useful.
BTW, Radasm is an excelent editor. Thank you.

Fabio