News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Radasm and bcc

Started by Fabio, October 25, 2009, 09:05:11 PM

Previous topic - Next topic

Fabio

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.

KetilO

Hi Fabio

bcc certainy supports modules. See included project.

KetilO


Fabio

Good news, KetilO. Thanks

Fabio

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.

KetilO

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

Fabio

KetilO, Thank you for taking the time to answer my questions :).
Your example suit my needs perfectly.
Very much appreciated, really.

Fabio

#6
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!

KetilO

Hi Fabio

There is no way to compile a single module.

KetilO

Fabio

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.

Fabio

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